centre of gravity

Started by
3 comments, last by TheAdmiral 16 years, 4 months ago
Hi, How can I calculate the centre of gravity of a 3d object? Assuming that the object can be defined by a set of bounding boxes and that its density is uniform and without any physics engines.
--------------"We cannot all be masters." - William Shakespeare
Advertisement
From its bounding boxes? You can't. You'd need definitions of each of its volumes, which pretty much means the whole mesh, assuming it's closed (and if it isn't then there is no answer defined).

Theoretically, you could break an arbitrary closed mesh into its disjoint subsets, and then further subdivide into a union of convex polyhedra, compute the masses and centroids of each, then use a weighted arithmetic mean to find the resulting centre-of-mass, but that's a lot of work.

Tell us more about the mesh and what you plan to use its centre-of-mass for. Chances are that you'll get away with some simplification or other.
Ring3 Circus - Diary of a programmer, journal of a hacker.
see http://www.geometrictools.com/Documentation/PolyhedralMassProperties.pdf
Looks to me like he just wants the centre of mass of the bounding boxes guys. In which case I think it's:
centre = (box1Volume * box1Position + box2Volume * box2Position + ...) / totalVolume;
___________________________________________________David OlsenIf I've helped you, please vote for PigeonGrape!
Quote:Original post by RAZORUNREAL
Looks to me like he just wants the centre of mass of the bounding boxes guys. In which case I think it's:
centre = (box1Volume * box1Position + box2Volume * box2Position + ...) / totalVolume;

Where each boxnPosition is the centre of the box.
Ring3 Circus - Diary of a programmer, journal of a hacker.

This topic is closed to new replies.

Advertisement