Sign in to follow this  
johnnyBravo

How to use this tetrahedron volume equation?

Recommended Posts

johnnyBravo    100
Hi im calculating the volume of a tetrahedron(triangular pyramid), and I've got this equation which looks like its using matrices, as I dont know a whole lot about matrices, I was wondering if someone could help explain to me or show me, how to use this equation to get the volume?
          |x1–x4   y1–y4   z1–z4|
 V = (1/6)|x2–x4   y2–y4   z2–z4|
          |x3–x4   y3–y4   z3–z4|

Thanks

Share this post


Link to post
Share on other sites
jyk    2094
In case you haven't written a matrix library yet, you can also google for 'triple product'.

Share this post


Link to post
Share on other sites
SpaceDude    208
btw, pyramids and tetrahedrons are different shapes. A pyramid has 4 triangular faces with 1 quadrilateral face, while a tetrahedron only has 4 triangular faces.

Share this post


Link to post
Share on other sites
Devilogic    246
Actualy a pyramid has n triangular faces and 1 n-sided polygonal face.

So tetrahedrons are a subset of the larger class of pyramids. (A tetrahedron is a pyramid with an equilateral triangle as a "base face" [spelling?] and 3 equilateral triangles, of the same surface as the "base face", as "side faces" [spelling?].)

Share this post


Link to post
Share on other sites
johnnyBravo    100
Wait so what your saying is, all 4 triangles have to be of the same size for that equation to work properly?

As I ran that equation in my program and also tried the 1/6 * edge * height1 * height2 equation on paper and I got the same answer... which was what i wanted. And the base triangle wasnt an equallateral triangle, either were the side triangles.

Thanks

Share this post


Link to post
Share on other sites
jyk    2094
Quote:
Wait so what your saying is, all 4 triangles have to be of the same size for that equation to work properly?

As I ran that equation in my program and also tried the 1/6 * edge * height1 * height2 equation on paper and I got the same answer... which was what i wanted. And the base triangle wasnt an equallateral triangle, either were the side triangles.
As you noted, the equation you posted works for general tetrahedra; the sides need not be equilateral. Furthermore, the equation returns the signed volume. The absolute value is the volume, and the sign tells you something about how the points are arranged relative to each other. The equation can be used, for example, as a relative line orientation predicate, useful in ray-triangle intersection. Note that if you are only interested in the sign, you can drop the 1/6.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this