SEARCH HOME
 Math Central Quandaries & Queries
 Question from Ozen, a student: Dear Professor, I want to calculate the volume of a closed 3D mesh object having a surface made up triangles.

For the moment, let's suppose the object to be convex and to contain the origin. Its volume is the sum of the volumes of all tetrahedra bounded by the origin and a mesh triangle. These can be found using determinants; the volume of the tetrahedron with vertices (0,0,0), (a1,a2,a3), (b1,b2,b3) and (c1,c2,c3) is

[a1b2c3 +a2b3c1 + a3b1c2 -a1b3c2 -a2b1c3 - a3b2c1]/6.

Make sure to get the orders consistent (eg, each triangle's vertices enumerated in clockwise order as seen from outside) or the volume contributed may be negative in some cases.

If the object is not convex or does not contain the origin, it turns out that this makes no difference. If the origin "sees" the mesh triangle from outside the contribution is negative & the "cone" joining the object to the origin is thus cancelled out.

Good Hunting!
RD

Ozen wrote back

Dear Prof. Robert Dawson,

Sorry due to my insufficient question.
(My previous question was "I want to calculate the volume of a closed 3D mesh object having a surface made up
triangles")
The 3D closed mesh object is a car model.
That is, the 3D model has convexity and concavity.
In addition to its volume, it is also required the center of volume.

Kind Regards.

Ozen,

"The 3D closed mesh object is a car model. That is, the 3D model has convexity and concavity."

As I said last time, that does not matter. Neither does it need to be connected (a Citroen Deux-Chevaux?) or simply connected (a Ford Torus?). It does have to have a well-defined interior (no Klein bottles.)

"In addition to its volume, it is also required the center of volume."

For each component tetrahedron, multiply the (signed) volume by the barycenter (vector average of the four vertices) and sum this over all faces. Then divide by the overall volume.

Good hunting!
RD

Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.