Calculate the volume of on object given by a set of points.

Object: Volume: calculated actual

The volume is calculated by using the Divergence theorem.

V(F)dV=S(Fn)dS

where the left hand integral is over the internal volume and the right hand integral is over the surface, n is the outward unit length surface normal, is the divergence, divF=F=(x,y,z)F

If F is the field giving the position vector F(x,y,z)=xi+yj+zk then divF=3, so the left hand integral is just V3dV, three times the volume.

Hence to find the volume of a surface we just need to calculate S(Fn)dS. If the surface is polyhedron with set pologonal faces P1,Pn the integral can be reduced to a sum over all the faces. The dot product Fn is constant for all points on the face, so the integral over any face P is just area(P) vn where v is any vertex on the surface. Hence the volume is given by

13i=1narea(Pi) vini

where vi is a vectex of the i-th face and n1,,nn are the outward pointing normals.

If ai, bi, ci are the three vertices of a triangular face the (non unit length) normal can be calculate as ni=(biai)×(ciai). The unit length normal is n^i=ni/|ni| and area of the triangle is 12|ni|. The dot product becomes ain^i. The whole volume becomes

16i=1n±aini,

where the signs are chosen so the normals are outwards.

Readers comments

vectex of the ith face

David Seed Fri Jun 17 2016

please give a simple workd example. with a diagram i presume you mean any vertex in the i-th face and that v.n represents the vertical dstance from the face to the origin. but perhaps the outward facng sense requires the origin to be outside the solid i dont

Add a comment/link:

Enter your comment about this page here.

Subject:

 

Links To add a link to another website with useful info add the details here.
Name of Site:
URL for Site:
Details:

Your Name:
email address:
Email addressed added here will not be displayed on the website or be passed to third parties.
They are used incase we need to get in touch with you.
5 + 1 =
Answer the sum to prove your not a robot. As we all know robots can't add.
To prevent spam all comments are moderated, comments with spam or swearing are blocked.

Msqli defined