2009

Given that we are talking about simulating a continuously evolving state (in
other words, objects are moving and colliding and reacting all the time in
general), we need to map this to a series of snapshots in order to generate an
animation. In a computer game, for example, we typically want to display the
world 60 times per second, because this is how frequently many graphics
systems can redraw the screen. When creating an animation, we may want
to store the state (that is, create a keyframe) for every frame. At 60 FPS, for
example, this would also create 60 keyframes every second, What this really
means is that the physics engine must be capable of evolving the world by
1/60th of a second knowing the state of all the objects at the start of this time
interval and knowing the external forces acting on these objects. As an example
we'll look at the simple case of a cannon ball and well assume we're interested
in animation at 60Hz (Hz = cycles or frames per second).
Simulating a Cannon Ball
Lets forget about collisions for now, and consider only the simulation of a
cannon ball immediately after it has been fired from the cannon. We know
the balls position (and orientation, but we'll ignore this for now), speed,
acceleration, and weight, and we assume we know the state of the environment
(air resistance, wind force, gravity). Armed with this knowledge we can start
to make predictions using a physics engine.
This figure illustrates what we would like to achieve. Over a period of time
the cannon balls rate of ascent should slow due to gravity, and it should
eventually fall to the ground having traveled through a classic parabolic arc
(assuming no air resistance).
At a given point in time we can examine the state of the ball (its speed v and
acceleration a) and knowing the external forces acting on it we can make a
guess as to its change in position after a period of time has elapsed (call this
period h seconds). This guess is a combination of a number of factors:
We assume that Newtons laws of motion govern the motion of the ball
Introducing Dynamics Simulation | 3891