how can i calculate the volume of my 3d triangular mesh model (surface based mesh)

Started by
21 comments, last by Misery 13 years, 6 months ago
how can i compute the volume of my 3d triangular mesh model (surface based mesh)...

and how can i compute the volume of triangle...

I tried this link

http://stackoverflow.com/questions/1406029/how-to-calculate-the-volume-of-a-3d-mesh-object-the-surface-of-which-is-made-up-t

but when i implemented...I got some difference...

the width , height and depth of my rectangle is

width = 120.9
height = 63.6656
Depth = 39.87

so the total volume should be w*h*d = 306898
but with volume of triangle I found is 249042 .

how can i find exact volume through triangle volume.
may be i need to compute voxels but how ?

thanks
Advertisement
Well, I don't know, but some notes about the terms you use:

triangles don't have volumes. "Tetrahedron":s have volumes.

by vowels (the a,e,i,o,u sounds) you mean "voxel":s
oh i need to edit.. thanks for pointing mistake :)
Well, there's an idea, but I haven't though it through.

For every triangles: connect the three vertices with the origin (0,0,0 of your coordinate system), that will be a tetrahedron. Calculate its volume. This has to be a signed volume: if the origin is at the back side of the triangle (if it's CCW) then it's positive; if the origin is on the front side then it's negative. Sum these volumes to get the volume of the whole mesh.
Or maybe the volume of the tetrahedron is signed anyway, if you calculate it using vector algebra (which you should).
I guess that would work for a convex mesh..
Quote:Original post by Nanook
I guess that would work for a convex mesh..


I think not, if you use SIGNED (+/-) volumes for the tetrahedrons. Just like in 2D.
Adding up the signed volumes works just fine.
ya i am also guessing this method could be apply in convex mesh but what about cancave like Teapot...torus...?
Quote:Original post by alvaro
Adding up the signed volumes works just fine.

This topic is closed to new replies.

Advertisement