1
\$\begingroup\$

I'm looking at the implementation of a physics engine and I observe that the inertia tensor of a rigid body, in local-space coordinates, is stored as a 3 dimensional vector, rather than a 3x3 matrix, and the description says "A vector with the three values of the diagonal 3x3 matrix".

A diagonal matrix is one with all zero off-diagonal entries.

What I don't understand is why the inertia tensor in local coordinates would be diagonal? Why couldn't it have non-zero off-diagonal entries?

\$\endgroup\$
4
  • \$\begingroup\$ github.com/DanielChappuis/reactphysics3d/issues/191 \$\endgroup\$ – Andrew Tomazos Feb 8 at 8:40
  • \$\begingroup\$ Is there some method to get the principle axes of inertia? Basically these are the three eigenvectors you get when diagonalizing the inertia tensor (with SVD or some decomposition). \$\endgroup\$ – Emil Feb 9 at 7:05
  • \$\begingroup\$ @Emil: No, I was wondering that too. It looks like the library approximates a body with a potentially non-diagonal inertia tensor by generating a diagonal inertia tensor (say based on its AABB). It doesn't rotate the body to its principle axes of inertia or anything like that. \$\endgroup\$ – Andrew Tomazos Feb 10 at 4:08
  • \$\begingroup\$ The author of the library gave a good explanation, see the github link above. \$\endgroup\$ – Andrew Tomazos Feb 10 at 4:47
1
\$\begingroup\$

Think about what the inertia tensor is doing- it describes an objects resistance to rotational motion along each of the 3 axes. Each of the 3 elements which comprise the diagonal of the inertia tensor describe the resistance to motion along each of the 3 local space axes. If you made some of the elements in the column vectors non-zero, you would simply be limiting one of the other two axes- which is the natural result of applying a rotation to the inertia tensor.

Since any given object must have an origin and original orientation, it only makes sense to define them in local space as simply as possible, for both memory reasons as well as simplicity.

I suggest reviewing the polyhedral mass properties algorithm to gain a better understanding of how the diagonal is calculated. It is essentially a volume integral of a solid defined by triangular regions.

I should also mention that the inverse inertia tensor is the quantity actually used by a physics engine, so defining them as a diagonal makes the inverse process significantly simpler.

\$\endgroup\$
1
  • \$\begingroup\$ Sorry but your understanding is not correct. The inertia tensor describes the resistance to rotation along any possible axis, not just the three basis axes. The off-diagonal terms are called "products of inertia", and are a necessary component to describe the angular mass along an arbitrary axis. I think I've figured out that the reason they are elided in this particular physics engine is that it only supports shapes that have diagonal inertia tensors (sphere, cube, etc), it approximates the inertia tensor of complex meshes with the inertia tensor of their AABB (which is again diagonal). \$\endgroup\$ – Andrew Tomazos Feb 8 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.