# Cuboid Inertia: Shells, Wireframes, Vertices

In a previous post I derived the inertia matrix for an ellipsoidal shell. This time, we're going to look at inertia matrices for cuboids (that is, rectangular prisms) with various mass distributions. All of these inertia computations are implemented in my rigid body library rigeo, including the symbolic derivations (shell, wireframe, vertices) and Monte Carlo simulations to validate them (shell, wireframe).

## Uniform-Density Cuboid

Let's start with the simplest case: a cuboid with uniform density. The value of
the inertia matrix for a uniform-density cuboid with mass $m$ and side lengths
$2a,2b,2c$ (the quantities $a,b,c$ are known as the *half extents*) is
well-known
to be $\bm{I}=(1/3)m\bm{S}$, where

When we have a cube, such that $a=b=c=r$, then this reduces to $\bm{I}=(2/3)mr^2\bm{1}_3,$ where $\bm{1}_3$ is the $3\times3$ identity matrix.

## Hollow Cuboid Shell

Suppose instead we want to calculate the inertia matrix for a hollow cuboid shell; that is, a cuboid in which all of the mass is uniformly distributed across its boundary. The most straightforward way to calculate this is to allocate mass to each of the cuboid's six sides in proportion to their respective areas, and then sum them together about the origin. The result is

$\begin{equation*} \bm{I} = \begin{bmatrix} I_{xx} & 0 & 0 \\ 0 & I_{yy} & 0 \\ 0 & 0 & I_{zz} \end{bmatrix}, \end{equation*}$where

$\begin{align*} I_{xx} &= m(ab^3 + 3ab^2c + 3abc^2 + ac^3 + b^3c + bc^3)/d, \\ I_{yy} &= m(a^3b + a^3c + 3a^2bc + 3abc^2 + ac^3 + bc^3)/d, \\ I_{zz} &= m(a^3b + a^3c + 3a^2bc + ab^3 + 3ab^2c + b^3c)/d, \\ d &= 3(ab + ac + bc), \end{align*}$which is a bit messier than the uniform-density result above. However, when we have a cube, this reduces to $\bm{I}=(10/9)mr^2\bm{1}_3$.

## Cuboid Wireframe

Let's take it further and suppose that all the mass is now concentrated
uniformly in the *edges* of the cuboid, as if we have a wireframe model with
infinitely thin wires. We can again allocate mass to each of the 12 edges in
proportion to their respective lengths, and sum the resulting inertias about
the origin to obtain

where

$\begin{align*} I_{xx} &= m(3ab^2 + 3ac^2 + b^3 + 3b^2c + 3bc^2 + c^3)/d, \\ I_{yy} &= m(a^3 + 3a^2b + 3a^2c + 3ac^2 + 3bc^2 + c^3)/d, \\ I_{zz} &= m(a^3 + 3a^2b + 3a^2c + 3ab^2 + b^3 + 3b^2c)/d, \\ d &= 3(a + b + c). \end{align*}$When we have a cube, this reduces to $\bm{I}=(14/9)mr^2\bm{1}_3$.

## Cuboid Vertices

Finally, let's suppose we evenly distribute the mass among the eight vertices. Then we get $\bm{I}=m\bm{S}$, and $\bm{I}=2mr^2\bm{1}_3$ for a cube.

## A Pattern For Cubes

When we have a cube, we have the following nice pattern:

$\begin{align*} \bm{I}_{\mathrm{uniform}} &= (6/9)mr^2\bm{1}_3, \\ \bm{I}_{\mathrm{shell}} &= (10/9)mr^2\bm{1}_3, \\ \bm{I}_{\mathrm{wireframe}} &= (14/9)mr^2\bm{1}_3, \\ \bm{I}_{\mathrm{vertices}} &= (18/9)mr^2\bm{1}_3, \end{align*}$where we see an increase of $(4/9)$ to the coefficient each time. I would like to know if there is a good fit for a $(2/9)$ term.