# How to use this tetrahedron volume equation?

## Recommended Posts

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 on other sites
That's a determinant, scroll down for a 3x3. That should get you started on finding out what the equation says.

##### Share on other sites
In case you haven't written a matrix library yet, you can also google for 'triple product'.

##### Share on other sites
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 on other sites
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 on other sites
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 on other sites
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.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
627741
• Total Posts
2978887

• 10
• 10
• 21
• 14
• 14