Game Development Reference
In-Depth Information
where a p i is the distance of particle i from the center of mass of the object, in the
direction of a .Weusethistocalculate I xy , I xz ,and I yz . In the case of I xy ,weget
n
I xy =
m i x p i y p i
i
=
1
where x p i is the distance of the particle from the center of mass in the X axis direction;
similarly for y p i in the Y axis direction. Using the scalar products of vectors we get
n
I xy =
m i ( p i ·
x )( p i ·
y )
i = 1
Note that, unlike for the moment of inertia, each particle can contribute a negative
value to this sum. In the moment of inertia calculation, the distance was squared, so
its contribution is always positive. It is entirely possible to have a non-positive total
product of inertia. Zero values are particularly common for many different shaped
objects.
It is difficult to visualize what the product of inertia means either in geometrical
or mathematical terms. It represents the tendency of an object to rotate in a direction
different from the direction in which the torque is being applied. You may have seen
this in the behavior of a child's top. You start by spinning it in one direction, but it
jumps upside down and spins on its head almost immediately.
For a freely rotating object, if you apply a torque, you will not always get rotation
about the same axis to which you applied the torque. This is the effect that gyroscopes
are based on: they resist falling over because they transfer any gravity-induced falling
rotation back into the opposite direction to stand up straight once more. The prod-
ucts of inertia control this process: the transfer of rotation from one axis to another.
We place the products of inertia into our inertia tensor to give the final structure:
I x
I xy
I xz
I
=
I xy
I y
I yz
[10.2]
I xz
I yz
I z
The mathematician Euler gave the rotational version of Newton's second law of mo-
tion in terms of this structure:
I θ
τ
=
which gives us the angular acceleration in terms of the torque applied:
θ
I 1 τ
=
[10.3]
where I 1
is the inverse of the inertia tensor, performed using a regular matrix inver-
sion.