Game Development Reference
In-Depth Information
Figure 1.6. Converting between angular and linear velocities.
can determine the linear velocity at a displacement r from the center of rotation
( Figure 1.6) using the following equation:
v = ω
×
r .
(1.5)
If the object is also moving with a linear velocity v l , this becomes
v = v l + ω
×
r .
The inertial tensor I is the rotational equivalent to mass. Rather than the single
scalar value of mass, the inertial tensor is a 3
3 matrix. This is because the
shape and density of an object affects how it rotates. For example, consider a
skater doing a spin. If she draws her arms in, her angular velocity increases. So
by changing her shape, she is changing her rotational dynamics.
Computing the inertial tensor for an object is not always easy. Often, we can
approximate it by using the inertial tensor for a simpler shape. For example, we
could use a box to approximate a car or a cylinder to approximate a statue. If
we want a more accurate representation, we can assume a constant density object
and compute it based on the tessellated geometry. One way to think of this is as
the sum of tetrahedra, where each tetrahedron shares a common vertex with the
others, and the other vertices are one face of the original geometry. As the inertial
tensor for a tetrahedron is a known quantity, this is a relatively straightforward
calculation [Kallay 06]. A quantity that has no linear complement is the center
of mass. This is a point, relative to the object, where applying a force invokes
no rotation. We can think of this as the perfect balance point. The placement of
the center of mass varies with the density or shape of an object. So a uniformly
dense and symmetric steel bar will have its center of mass at its geometric cen-
ter, whereas a hammer, for example, has its center of mass closer to its head.
Placement of the center of mass can be done in a data-driven way by artists or
designers, but more often, it comes out of the same calculation that computes the
inertial tensor.
×