inertia tensor matrix for ensemble of particles.
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?
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
a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
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.mass*(p.y*p.y + p.z*p.z);<br> Iyy += p.mass*(p.x*p.x + p.z*p.z);<br> Izz += p.mass*(p.x*p.x + p.y*p.y);<br> Ixy += p.mass*(p.x*p.y);<br> Ixz += p.mass*(p.x*p.z);<br> Iyz += p.mass*(p.y*p.z);<br>}<br><br>When you''re done, the inertia tensor will be:<br><br> [ Ixx Ixy Ixz ] <br>IT = | Iyx Iyy Iyz |<br> [ Izx Izy Izz ]<br><br>And you also have the total mass of the system. </i> <br><br>Graham Rhodes<br>Senior Scientist<br>Applied Research Associates, Inc.
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.mass*(p.y*p.y + p.z*p.z);<br> Iyy += p.mass*(p.x*p.x + p.z*p.z);<br> Izz += p.mass*(p.x*p.x + p.y*p.y);<br> Ixy += p.mass*(p.x*p.y);<br> Ixz += p.mass*(p.x*p.z);<br> Iyz += p.mass*(p.y*p.z);<br>}<br><br>When you''re done, the inertia tensor will be:<br><br> [ Ixx Ixy Ixz ] <br>IT = | Iyx Iyy Iyz |<br> [ Izx Izy Izz ]<br><br>And you also have the total mass of the system. </i> <br><br>Graham Rhodes<br>Senior Scientist<br>Applied Research Associates, Inc.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement