[vtkusers] Re: Volume of a tetrahedron

Peter.Vanroose at esat.kuleuven.ac.be Peter.Vanroose at esat.kuleuven.ac.be
Wed Jun 6 12:25:37 EDT 2001


Pearu Peterson wrote:
> 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.


If I'm not mistaken, the denominator should be 6 instead of 2.
(Correct me if not; I just checked this for a simple case.)
Also, I think you can avoid taking sqrt, since determinant(W * W^T)
is just the square of determinant(W), which simplifies the expression to:

	V = abs(determinant(W)) / 6.

and you may of course also take p1 etc as row vectors instead of as column vectors.


--                  Peter Vanroose
                    Electrotechnical Department (ESAT/PSI)
                    K.U.Leuven, Belgium.
                    Peter.Vanroose at esat.kuleuven.ac.be




More information about the vtkusers mailing list