Re: centre of gravity and volume for mesh model



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/
.



Relevant Pages

  • Re: centre of gravity and volume for mesh model
    ... gravity) and volume for a mesh model (e.g. as imported from an OBJ ... To find the center of gravity (or "centroid") of a polygonal mesh: ... all of the triangles, weighted by the doubled area of each face. ...
    (comp.graphics.api.opengl)
  • Re: centre of gravity and volume for mesh model
    ... Just to nit pick, the center of gravity isn't exactly the same thing as the ... centroid, as the centroid is the geometric center while the center of gravity is the point on a solid where ... just happens that under some circumstances the two points coincide. ...
    (comp.graphics.api.opengl)
  • Re: centre of gravity and volume for mesh model
    ... 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 ...
    (comp.graphics.api.opengl)
  • Re: center of gravity
    ... the centroid IS the center of gravity because the ... image has uniform value everywhere. ... crops out the foreground blobs out of the image and then you can just ...
    (comp.soft-sys.matlab)
  • centre of gravity and volume for mesh model
    ... is it possible to calculate the COG (centre-of- ... gravity) and volume for a mesh model (e.g. as imported from an OBJ ...
    (comp.graphics.api.opengl)