How can I calculate the surface normal of each equilateral triangle that makes up a tetrahedron?
These are the xyz coordinates of the tetrahedron
(+1, +1, +1) (−1, −1, +1) (−1, +1, −1) (+1, −1, −1)
How can I calculate the surface normal of each equilateral triangle that makes up a tetrahedron?
These are the xyz coordinates of the tetrahedron
(+1, +1, +1) (−1, −1, +1) (−1, +1, −1) (+1, −1, −1)
Sketch-hint:
It might be the case you need to make them all outward-pointing, in which case you have to keep track of the edge vectors' directions relative to each other; it might help to draw a picture, and keep in mind a certain rule for the type of calculations you'll be doing... (Also, you might want to normalize the answers, if you want unit normals.)
There are slicker ways of doing this, but...
Each side is determined by 3 points. Ignore one of the points and you're left with points which determine one of the four possible triangular sides. Then by taking differences of points you'll obtain vectors parallel to that side. Finally cross product two such vectors and you'll get a normal (then normalize).
For example: (Ignore point number 4) $(1,1,1) - (-1,-1,1) = (2,2,0)$ and $(1,1,1) - (-1,1,-1) = (2,0,2)$. Take the cross product and get $(4,-4,-4)$ finally normalize and get $(1/\sqrt{3})(1,-1,-1)$
Now repeat for other sides.
(if they need to be outward pointing, a quick sketch will help determine if you need to multiply by -1)