[ODE] Inertia matrices

lukasz@datafast.net.au lukasz at datafast.net.au
Tue Apr 15 20:12:02 2003


I'm trying to figure out how to generate inertia matrices for other types
of objects. Initially, what I need is an inertia matrix for a non-uniformly
scaled sphere. I had a look in mass.cpp at dMassSetSphere. If I want to
scale the sphere by <sx, sy, sz> then do I multiply I(0,0) by sx, I(1,1) by
sy and I(2,2) by sz?

Later on I may need much more complex objects, but if I can define the
shape of the objects by equations is there a systematic way of generating
inertia matrices for them? Can the inertia matrices of two different
objects be multiplied/added together to produce the inertia matrix of some
kind of composite of those two objects?

P.S. Does anyone know why there are a lot of weird constants floating
around in mass.cpp? For example, dMassSetBox multiplies its inertia matrix
entries by 1/12, and dMassSetSphere by 0.4.

Thanks,
Lukasz.