Moment of Inertia in 2D
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
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!)
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!)
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?
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?
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.
As far as equations go, I''m not sure on the net. Give it a Google, hopefully there''s some out there.
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
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).
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).
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.
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?
R is not constant. It''s the length from current mass center to the center of the rotation.
(damn my english)
(damn my english)
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement