[vtkusers] Re: Volume of a tetrahedron

anast.jm at pg.com anast.jm at pg.com
Wed Jun 6 13:59:12 EDT 2001


The definition I have (CRC Standard Math Tables and Formulae) states volume of a
tetrahedron
 with one vertex at the origin and the other vertices at        x1y1z1    x2y2z2
x3y3z3

        | x1 y1 z1 |
v= 1/6  | x2 y2 z2 |
        | x3 y3 z3 |

so it seems to me the W matrix in Peter's simplified equation below should be

W=[p2-p1, p3-p1, p4-p1] so as to translate all points relative to p1 as the
origin.

I'm a little rusty so perhaps I missed something???

...john




                                                                
 Internet Mail Message                                          
 Received from host:      public.kitware.com                    
 [208.136.18.25]                                                
                                                                


From: Peter.Vanroose at esat.kuleuven.ac.be@public.kitware.com on 06/06/2001 06:25
PM ZE2
                                                                                                            
 Peter.Vanroose at esat.kuleuven.ac.be@public.kitware.com           To:   vtkusers at public.kitware.com          
                                                                 Cc:   ferrant at tele.ucl.ac.be (bcc: John    
                                                              Anast-JM/PGI)                                 
           Sent by:  vtkusers-admin at public.kitware.com   Subject:      [vtkusers] Re: Volume of a           
                                   06/06/2001 12:25 PM        tetrahedron                                   
                                                                                                            
                                                                                                            




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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers







More information about the vtkusers mailing list