Moments of Inertia for Triangles and other Polygons
In my previous two articles I discussed collision detection and response between rigid bodies. In order to do proper collision response between rotating objects, we needed to calculate the moment of inertia about their center of mass. Here I’m going to describe how to get the moment of inertia for an arbitrary triangle, and then I’ll show a triangulation algorithm to apply this to any polygon. Right Triangles The first step is going to be calculating the moment of inertia for a right triangle, since we can get a simple closed formula. Let’s define the right triangle as having a width w and a height h, rotating about the origin with a uniformly distributed mass of density ρ. We know the area is equal to wh/2 so we can calculate the density if we only have the mass. ...