Polyhedron Volume
From CGAFaq
Assume that the surface is closed, every face is a triangle, and the vertices
of each triangle are oriented counterclockwise from the outside. Let
be the signed volume of the tetrahedron
formed by a point
and a triangle
. This may be computed by a
determinant, as in [ORourke:1998, page 26]
Choose an arbitrary point (e.g., the origin), and compute
where the sum is over the triangles
of the surface.
The value
is the volume of the object. The justification for this claim is nontrivial,
but is essentially the same as the justification for the computation of the
area of a polygon.
C Code is available at

