Archived

This topic is now archived and is closed to further replies.

kindfluffysteve

inertia tensor matrix for ensemble of particles.

Recommended Posts

oh man, still no replies? well the truth is, it''s because finding the inertia tensor for complex objects is difficult. i''m not sure what your "ensemble" most closely resembles, but you should be able to find formulae for primitives like spheres and boxes.

a2k

Share this post


Link to post
Share on other sites
Its actually quite simple to calculate the inertia tensor for a cloud of spherical particles with mass:

Let (Xo, Yo, Zo) be the point about which you want to calculate the inertias. Then, here''s the pseudocode

float Ixx = 0., Iyy = 0., Izz = 0., Ixy = 0., Ixz = 0.;
float Iyz = 0., mass = 0.
Particle *p = all the particles;

for (int i = 0; i < numparticles; i++)
{
mass += p.mass;
Ixx += p[i].mass*(p[i].y*p[i].y + p[i].z*p[i].z);
Iyy += p[i].mass*(p[i].x*p[i].x + p[i].z*p[i].z);
Izz += p[i].mass*(p[i].x*p[i].x + p[i].y*p[i].y);
Ixy += p[i].mass*(p[i].x*p[i].y);
Ixz += p[i].mass*(p[i].x*p[i].z);
Iyz += p[i].mass*(p[i].y*p[i].z);
}

When you''re done, the inertia tensor will be:

[ Ixx Ixy Ixz ]
IT = | Iyx Iyy Iyz |
[ Izx Izy Izz ]

And you also have the total mass of the system.


Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites