The polyhedron volume
can be computed for a closed polyhedron composed of
triangular faces with vertices
using the divergence
theorem as
where the normal is given by the cross product
The vertices of each face must be ordered so that points outward. These formulas apply to polyhedra
with arbitrary faces, since faces
having more than three vertices can be triangulated.
They apply to convex polyhedra as well as nonconvex
polyhedra.
The volume can also be computed using the divergence theorem by integrating the vector field , which has divergence
everywhere, over the triangulated faces of the
polyhedron.