6.21 PROCESSOR
If you have gone through all animation examples so far, you are already
familiar with this method. It is used for converting particle system
oriented object attributes like the "velocity" to real motions.
Let's consider a particle system which consists of a sphere, a radial
force and a processor method and take a look at what actually happens
when the animation is played.
1. The global time is increased by a value depending on the frame
resolution and all methods are to be informed about the new time.
2. The RADIAL FORCE manipulates the velocity attribute of the sphere.
Because the radial force knows how strongly (F) it affects the sphere
and how long the time (dt) has affected the sphere since the last
frame, it can calculate how much (dv) the velocity of the sphere
having a certain mass (m) should be changed.
This all happens according to the Newtons laws of motion:
dv F * dt
F=m*a=>F=m*--=>dv=------
dt m
========
If the formula "F=m*a" tells you nothing, you probably didn't
understand everything presented above. However, the formula can be
described in a more understandable form: if we know how long a certain
force affects an object with a certain mass, we can solve how much the
velocity of the object changes.
3. Then the PROCESSOR method reads the current velocity of the sphere and
calculates how far (ds) the sphere has travelled since the last frame
(dt) with its current velocity:
ds
v=---- => ds=v*dt
dt =======
In a human readable form, this could be something like: if you drive
your car and you know how long you have driven and how fast, you can
calculate how far you will get.
|