2D circle and OBB moments of inertia

Started by
4 comments, last by too_many_stars 7 years, 6 months ago

Hi guys,

Just wondering where one finds information about the relationship between mass, density and inertia when it comes to simple 2D shapes. It's my understanding I don't need to use tensors such as in 3d, and the inertia, and consequently inverse inertia = 1.0f/inertia should be a single float value.

Thanks,

Mike

Advertisement
Integral of density is mass, integral of position times density divided by mass is center of mass, integral of density times the square of the distance to the center of mass is moment of inertia. [EDIT: I had forgotten about the square, sorry.]

I guess I just went to a good high school. :)

Hi Alvaro,

Thanks for your response, but I still don't understand. Let's say for simplicity, I make the mass of a circle equal to the area times a density value ie mass=(PI*r*r*)*density. Now, I am not sure how to get a proportionate moment of inertia value. The circle is always in world space.

Also, an OBB which is in local space, but gets transformed into world space every update step could have a mass of widht*height*density. How do I get a moment of inertia value?

Thanks,

Mike

The circle case should be easier. I guess by "OBB" you mean "rectangle". In that case, the center of mass is the center of the rectangle, and the moment of inertia is the integral of density*(x^2 + y^2) for x=-w/2 to x=+w/2 and y=-h/2 to y=+h/2, which is 1/12*width*height*(width^2+height^2)*density = mass * (width^2+height^2)/12, unless I made a mistake.

For the circle I think you get (Pi/2)*radius^4*density = mass * radius^2 / 2
The moment of inertia is generally used as a function to convert between torque and angular velocity. Because there is only one plane through which objects can rotate in 2D, the torque and the angular velocity will always be in the same plane, and thus the function which maps torque to angular velocity takes only one input and produces only one output. This function also happens to always be a linear mapping, which means the function can be represented as a matrix. A matrix which maps just a single input value to a single output value is a 1x1 matrix, and effectively becomes just a scalar. So yes, in 2D the moment of inertia, like the mass, is a value that scales an input. The mass tells you how difficult something is to translate and scales down linear forces, and the moment of inertia tells you how difficult something is to rotate and scales down angular torques.

For a single point, the amount of work it takes to rotate it is proportional to its mass and the square of its distance from the axis of rotation.

I = m*r^2

For any other shape, you can break it down into an integral over the set of points that make up the shape. Integrals really just sum up the contributions of all of the points, distributing an equal infinitesimal part of the mass of the whole to each one. For instance, given a rectangle with a mass m, height h, and width w, you can break it up into an infinite number of micro-areas that are a width of dx, a height of dy, and have a mass of m * (dx*dy) / (w*h), i.e. the percentage of mass that little piece has relative to the area of the whole. Each piece would then contribute that area times the distance of that piece squared from the axis of rotation (usually the center of mass of the shape). I won't go into all of the details here, but there are plenty of resources online for how to compute a double integral, which is what you need for summing up contributions over a 2D area. I recommend starting here: https://betterexplained.com/articles/a-calculus-analogy-integrals-as-multiplication/

Wikipedia has a list of moments of inertia for some common shapes here: https://en.wikipedia.org/wiki/List_of_moments_of_inertia

Thank you for the help guys. It appears to understand the derivation I have to brush up on my calculus.

Thanks for the great links AntiTwister, especially the first one.

Mike

This topic is closed to new replies.

Advertisement