Game Development Reference
In-Depth Information
equation in terms of an infinite number of particles, using an integral. For almost
all applications, however, you can get away with splitting an object into particles and
using the sum. This is particularly useful when trying to calculate the moment of
inertia of an unusual-shape object. We'll return to the moments of inertia of different
objects later in the section.
Clearly we can't use a single value for the moment of inertia as we did for mass.
It depends completely on the axis we choose. About any particular axis, we have only
one moment of inertia, but there are any number of axes we could choose. Fortunately
the physics of rigid bodies means we don't need to have an unlimited number of
different values either. We can compactly represent all the different values in a matrix
called the “inertia tensor.”
Before I describe the inertia tensor in more detail, it is worth getting some ter-
minology clear. The moments of inertia for an object are normally represented as an
inertia tensor. However, the two terms are somewhat synonymous in physics engine
development. The “tensor” bit also causes confusion. A tensor is simply a generalized
version of a matrix. Whereas vectors can be thought of as a one-dimensional array
of values and matrices as a two-dimensional array, tensors can have any number of
dimensions. Thus both a vector and a matrix are tensors.
Although the inertia tensor is called a tensor, for our purposes it is always two-
dimensional. In other words, it is always just a matrix. It is sometimes called the “mass
matrix,” and we could call it the “inertia matrix,” I suppose, but it's not a term that I've
heard used. For most of this topic I'll just talk about the inertia tensor , meaning the
matrix representing all the moments of inertia of an object; this follows the normal
idiom of game development.
The inertia tensor in three dimensions is a 3
3 matrix that is characteristic of a
rigid body (in other words, we keep an inertia tensor for each body, just as each body
has its own mass). Along the leading diagonals the tensor has the moment of inertia
about each of its axes—X, Y, and Z:
×
I x
I y
I z
where I x is the moment of inertia of the object about its X axis through its center of
mass ; similarly for I y and I z .
The remaining entries don't hold moments of inertia. They are called “products
of inertia” and are defined in this way:
n
=
I ab
m i a p i b p i
i
=
1
Search Nedrilad ::




Custom Search