<- previous    index    next ->

Lecture 23, Movie about graphics


When using motion, dynamics, in your GUI, think about what
you want to convey.

Two choices are cartoon or realism.

The choice of cartoon allows you to violate the laws of
physics. You can squash, stretch and make objects fly
and stop instantaneously. This can be very effective
to impress the viewer.

In order to get realism, the motion needs to approximate
the real world laws of physics. In the simplest terms:
   dt is the time for one screen update
   ds is the distance moved for one screen update
   dv is the change in velocity for one screen update

   s is the objects position (may have 1, 2 or 3 components)
   v is the objects velocity (may have 1, 2 0r 3 components)
   a is the acceleration of the object        ( " )
   m is the mass of the object
   f is the force being applied to the object ( " )

Then, given a force, f, compute for each screen:

   a  = f / m     (may have 1, 2 or 3 components)
   dv = a * dt
   v  = v + dv
   ds = v * dt
   s  = s + ds

For a complete set of physics equations and related information
see click on last item, Physics Equations

  
Observe the movie. Do you notice any violations of the laws
of physics? This will be intuitive from your life experience,
not from trying to mentally compute equations.

  TV and VCR/DVD have been requested.

    <- previous    index    next ->

Other links

Go to top