1
$\begingroup$

I'm trying to figure out what the formula is to find the surface area of a non-regular tetrahedron when given the vertices coordinates.

Example:

Vertex $A$: $[0, 0, 5]$

Vertex $B$: $[-1, -1, 0]$

Vertex $C$: $[1, 0, 0]$

Vertex $D$: $[0, 2, 0]$

Basically I want to turn this user input into surface area.

Thank you

2 Answers 2

2

Hint: As a numerical analyst, the most common way to compute the face are of a bunch of tetrahedra is using cross product, since it is the most easily vectorized/paralleled algorithm. The face opposite to $A$ denoted as $F_A$ is spanned by the vector $\overrightarrow{BC}$ and $\overrightarrow{BD}$, then the area is $ |F_A| = \frac{1}{2} |\overrightarrow{BC}\times \overrightarrow{BD}| $

More likely since you mentioned "input", I am guessing you are writing some subroutine, if using cyclic notation that a tetrahedron has vertices $V_i$, $i=1,\cdots,4$, then above formula can be vectorized using the following MATLAB code snippets assuming you have your $i$-th vertex of the $n$-th tetrahedron stored in a 3d-array V(n,:,i):

face_normal = cross(V(:,:,i+1) - V(:,:,i-1), ... V(:,:,i+1) - V(:,:,i+2), 2); face_area = 0.5*sqrt(sum(face_normal.^2,2)); 

which could be easily ported to Python, C or Fortran.

  • 0
    @apichel Good to know your exact need! Then I suggest first build a subroutine for the cross product, if you are not allowed to use any other library than `stdio` and `stdlib`. Moreover if you could set an array storing the information of the faces, like `F[n][j]` is the index in the original vertex array for the $j$-th vertex in the $n$-th face, that would further ease your computation.2012-04-26
1

You have four triangles for which you can compute the sides from the Pythagorean theorem. For example, $CD=\sqrt{1^2+2^2+0^2}=\sqrt 5$. Then use Heron's formula

  • 0
    Exactly. That gets you face ABD. Each set of three edges chosen from the four represents one face of the tetrahedron.2012-04-26