#### Archived

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

# inertia tensor matrix for ensemble of particles.

This topic is 5911 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Could somebody tell me how to do this or show me a link? a rigid body has an inertia tensor matrix calculatable from the objects mass. my object is an ensemble of particles with mass. how do i calculate its inertia matrix?

##### Share on other sites
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 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 on other sites
i stand corrected. Bourg also has this method of calculating the tensor in his Physics for Game Developers book.

a2k

1. 1
2. 2
3. 3
Rutin
18
4. 4
JoeJ
14
5. 5

• 14
• 10
• 23
• 9
• 44
• ### Forum Statistics

• Total Topics
632634
• Total Posts
3007564
• ### Who's Online (See full list)

There are no registered users currently online

×