Fast and Accurate Computation of Polyhedral Mass Properties

The location of a body's center of mass, and its moments and products of inertia about various axes are important physical quantities needed for any type of dynamic simulation or physical based modeling. We present an algorithm for automatically computing these quantities for a general class of rigid bodies: those composed of uniform density polyhedra.

Our algorithm is based on a three step reduction of the volume integrals to successively simpler integrals. The algorithm is designed to minimize the numerical errors that can result from poorly conditioned alignment of polyhedral faces. It is also designed for efficiency. All required volume integrals of a polyhedron are computed together during a single walk over the boundary of the polyhedron; exploiting common subexpressions reduces floating point operations.

For more information, check out

 * Brian Mirtich, ``Fast and Accurate Computation of Polyhedral Mass Properties,'' journal of graphics tools, volume 1, number 2, 1996. [258K postscript] [69K gzipped postscript]

C code for the algorithm is also available, complete with examples. Just download it, untar the files, and see the README file.

Revision history:
26 Jan 1996 Program creation.
3 Aug 1996 Corrected bug arising when polyhedron density is not 1.0.
Changes confined to function main().
Thanks to Zoran Popovic for catching this one.
27 May 1997 Corrected sign error in translation of inertia product
terms to center of mass frame.
Changes confined to function main().
Thanks to Chris Hecker.

Interested in other practical algorithms for computer graphics? Visit the journal of graphics tools website.


Brian Mirtich / mirtich@cs.berkeley.edu / 6 September 1996