Game Development Reference
In-Depth Information
L is the length of the spring-damper ( L , not in bold print, is the magnitude of the vector
L ), which is equal to the vector difference in position between the connected points on
bodies 1 and 2. If the connected objects are particles, then L is equal to the position of
body 1 minus the position of body 2. Similarly, v 1 and v 2 are the velocities of the con‐
nected points on bodies 1 and 2. The quantity ( v 1 - v 2 ) represents the relative velocity
between the connected bodies.
Springs and dampers are useful when you want to simulate collections of connected
particles or rigid bodies. The spring force provides the structure, or glue, that holds the
bodies together (or keeps them separated by a certain distance), while the damper helps
smooth out the motion between the connected bodies so it's not too jerky or springy.
These dampers are also very important from a numerical stability point of view in that
they help keep your simulations from blowing up. We're getting a little ahead of ourselves
here, but we'll show you how to use these spring-dampers in real-time simulations in
Chapter 13 .
Force and Torque
We need to make the distinction here between force and torque. 4 Force is what causes
linear acceleration, while torque is what causes rotational acceleration. Torque is force
times distance. Specifically, to calculate the torque applied by a force acting on an object,
you need to calculate the perpendicular distance from the axis of rotation to the line of
action of the force and then multiply this distance by the magnitude of the force.
This calculation gives the magnitude of the torque. Typical units for force are pounds,
newtons, and tons. Since torque is force times a distance, its units take the form of a
length unit times a force unit (e.g., foot-pounds, newton-meters, or foot-tons).
Since both force and torque are vector quantities, you must also determine the direction
of the torque vector. The force vector is easy to visualize: its line of action passes through
the point of application of the force, with its direction determined by the direction in
which the force is applied. As a vector, the torque's line of action is along the axis of
rotation, with the direction determined by the direction of rotation and the right hand
rule (see Figure 3-3 ). As noted in Chapter 2 , the right hand rule is a simple trick to help
you keep track of vector directions—in this case, the torque vector. Pretend to curl the
fingers of your right hand around the axis of rotation with your fingertips pointing in
the direction of rotation. Now extend your thumb, as though you are giving a thumbs
up, while keeping your fingers curled around the axis. The direction that your thumb
is pointing indicates the direction of the torque vector. Note that this makes the torque
vector perpendicular to the applied force vector, as shown in Figure 3-3 .
4. Another common term for torque is moment .
Search Nedrilad ::

Custom Search