Re: centre of gravity and volume for mesh model
- From: John Tsiombikas <nuclear@xxxxxxxxxxxx>
- Date: 11 Nov 2009 22:17:32 GMT
On 2009-11-11, jefm <jef.mangelschots@xxxxxxxxx> wrote:
newbie question:
is it possible to calculate (or approximate) the COG (centre-of-
gravity) and volume for a mesh model (e.g. as imported from an OBJ
model) ?
What would be the approach ?
For the center of gravity you could just use the centroid of the mesh.
You can calculate the centroid by averaging the positions of all its
vertices.
As for the volume, you could easily calculate it using monte carlo
integration. Just generate random samples inside a bounding box of known
volume, and test how many of those samples fall inside the object. The
volume then is inside / num_samples * box_volume.
--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/
.
- Follow-Ups:
- Re: centre of gravity and volume for mesh model
- From: fungus
- Re: centre of gravity and volume for mesh model
- From: Wolfgang Draxinger
- Re: centre of gravity and volume for mesh model
- References:
- centre of gravity and volume for mesh model
- From: jefm
- centre of gravity and volume for mesh model
- Prev by Date: centre of gravity and volume for mesh model
- Next by Date: Re: centre of gravity and volume for mesh model
- Previous by thread: centre of gravity and volume for mesh model
- Next by thread: Re: centre of gravity and volume for mesh model
- Index(es):
Relevant Pages
|