Jump to content
  • Advertisement
Sign in to follow this  
glSmurf

computing the inertia tensor for...

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to know how to compute the inertia tensor (3D) for an ellipsoid, tetrahedron, pyramid, and cone. source code would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
looking at the formula for a spheres inertia, I assume this will work for an ellipsoid...

Matrix inertia();

inertia._11 = 0.4f * mass * radius.y * radius.z;
inertia._22 = 0.4f * mass * radius.x * radius.z;
inertia._33 = 0.4f * mass * radius.x * radius.y;


...is this correct?

Share this post


Link to post
Share on other sites
This(scroll down), this, this. I think that's all the shapes you need, if not google for "moment inertia <shape>". Place the values of those formulas on the diagonal of the inertia tensor.

If you need other shapes, you can calculate the moment of inertia yourself, there's a good description how to do it for arbitrary shapes in "Game Physics" by Eberly.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
pyramid: Iz = 0.1 * m * a²
cone: Ix = 0.3 * m * r²
Iz = 0.15 * m * (r² + 0.25 * h²)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
moment of inertia for general rotational bodies:

Ix = 0.5 * d * PI * INTEGRAL(r^4 dx)

where d = density and
r = the funtion that defines the shape when you cut it along its rotation axis

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!