# Combining Moment of Inertia Tensors

In a physics simulation of rigid bodies, if I have a cube with a known mass and moment of inertia tensor, and I attach it to another cube with a known mass and moment of inertia tensor such that its transform relative to the second cube is constant (put simply, they are stuck together completely), how can I compute the moment of inertia tensor of the resulting body? How would I compute it if I continued to add cubes in different places? Keep in mind that I'm not just stacking them, I could end up with a strange U or T or L shape, for instance. The cubes' rotation will all be identical, i.e. they will always be connected face-face, never vertex-face or edge-face or anything. They are all the same size, but may vary in mass. The faces will always connect in such a way that four vertices on one cube will touch four vertices on another cube (in other words, I won't have one cube poking out from behind another cube, they will line up nicely). The bodies have constant density.

Could I possibly use the Parallel Axis Theorem? Maybe find the center of mass of the combined bodies and finding the moment of inertia tensor for each body through that axis, and then somehow adding all the matrices together?

• Actually, @Qmechanic, it's not homework, I'm writing a game using a physics engine I wrote, it's a builder game, I need to be able to combine multiple rigid bodies. Commented Nov 25, 2014 at 23:18
• Hi Josh. Welcome to Phys.SE. If you haven't already done so, please take a minute to read the definition of when to use the homework-and-exercises tag, and the Phys.SE policy for homework-like problems. Commented Nov 25, 2014 at 23:32
• I see. But that would make it seem like every question I've asked, here or other Stack Exchange sites, would be classified as homework-and-exercises. It just seems too broad. Commented Nov 26, 2014 at 1:16