[vtkusers] Volume of a tetrahedron

Pearu Peterson pearu at cens.ioc.ee
Tue Jun 5 12:19:47 EDT 2001


On Tue, 5 Jun 2001, Matthieu Ferrant wrote:

> I am wondering if there is a method for computing the volume of a
> tetrahedral cell (or any other cell type).

If a tetrahedron is defined by its vertices p1,p2,p3,p4, then its volume
is

   V = sqrt(abs(determinant(W * W^T)))/2

where W is matrix defined as

   W = [p2-p1,p3-p2,p4-p3]

and p1,p2,p3,p4 are column vectors.

And for other cell types you can decompose them as a complex of simplexes 
and use the formula for simplexes and sum the results.

Pearu





More information about the vtkusers mailing list