Calculating the Rotational Inertia of Solid Bodies