Jump to content
  • Advertisement

Archived

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

Koobazaur

Moment of Inertia in 2D

This topic is 5130 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

Hey, I''ve been googling this topic but couldn''t find anything what I would be looking for... basically I need a pretty straightforward explanation how to calculate moment of inertia for 2D objects. I don''t want the final equations for different bodies but how to come up with an equation yourself (because I''m thinking about random shapes). I''ve tried to figure something on my own, but that didn''t work very well! THX

Share this post


Link to post
Share on other sites
Advertisement
So you want to know how to calculate the Moment of Inertia for objects of potentially varying shape and density?

You''re going to want to integrate r^2 dm, if the mass is varying. I''m not sure what you''d do if the density varies however. Maybe someone else knows better than I.

Anyways though, you may be better off going with known I values for shapes that resemble whatever you want the I of.

Oh, and remember the Parrallel Axis theorem, if the problem you''re having is that you want it to spin on an axis other than its'' center of mass:

I = I(cm) + md^2

Where d is the direct distance away from the center of mass. That way, you can spin whatever you want at whatever axis you want (even outside of the object itself!)

Share this post


Link to post
Share on other sites
Yeah, I know I could go with pre-defined I equations, but I would really want to be able to find my own for any random shape I create...
And I''m making the mass uniformly displaced...

and btw, do you know where I could find a lot of I equations for 2d objects?

Share this post


Link to post
Share on other sites
Is it imperative that the tiny variations on shape and size must equate to different I values in your program? If you''re doing physics for a game, it will be a lot easier on your processor load if you use the closest approximation to a known I for whatever object you make. No one playing the game will ever notice, I''m fairly certain.

As far as equations go, I''m not sure on the net. Give it a Google, hopefully there''s some out there.

Share this post


Link to post
Share on other sites
Assuming your shapes are polygons, then as I stated before : triangulate the shape, compute the moment of inertia for all those triangles around any axis, and sum it all up.

Victor Nicollet, INT13 game programmer

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Here''s the equation:

Sum ( Rk^2 * DMk ) k = 1->n

Where DMk = density * dVk.

Meaning that the (I equation whatever in english) is caclulated summing all mass centers together.

So I = Intergral (R^2*density*dV).

Share this post


Link to post
Share on other sites
Or, if you''re saying the mass is uniform, just find the cm and do r^2*mass for each vertex where mass is Mass(total)/numVertices.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Here''s the equation:

Sum ( Rk^2 * DMk ) k = 1->n

Where DMk = density * dVk.

Meaning that the (I equation whatever in english) is caclulated summing all mass centers together.

So I = Intergral (R^2*density*dV).




I don''t want to sound like an idiot but the problem is - I don''t really understand the equation. I''m taking pre-calc this year and so I covered all this, but still...
If I understand it correctly, R and density are constants in the integral so I can put them out front:

I = R^2*density * integral(dV) = R^2*density*V = R^2 * mass

Which is basically where I started (I = R^2 * mass is the original equation) ...
How am I supposed to "use" the equation you gave me?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
R is not constant. It''s the length from current mass center to the center of the rotation.
(damn my english)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
What you should do in 2d is that you calculate center for every triangle and for the whole object(if you want to rotate it around mass center). Then you get the I by calculating the triange_density * (Center - triangle_center)^2 * area_of_triangle, and then sum all these together.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!