6
$\begingroup$

I am trying to draw an equilateral/regular tetrahedron in Processing (subset of Java), so I have to define 4 triangles that meet at the 4 vertices. I have been able to find the coordinates for the vertices assuming 1 of the vertices is at the origin.

However, the tetrahedron rotates, and I would like its rotation to be about its centroid. This where I get stuck, I need to define the 4 planes of the tetrahedron when the centroid is at the origin.

I hope my question is clear. :/ Thanks in advance.

$\endgroup$
12
$\begingroup$

According to this Wikipedia article, if the origin is at the centre, then you can take the vertices to be

$$(\pm 1, 0, -1/\sqrt{2}),\,\,\,\,\, (0, \pm 1, 1/\sqrt{2}).$$

The article does also give some alternatives such as $(1, 1, 1, ), (1, -1, -1), \dots $ which might be easier to work with.

$\endgroup$
  • $\begingroup$ Thanks! I have another question: How are the vertices related to edge-length? It says these coordinates are for a tetrahedron of length 2 – so does that mean I replace the sqrt(2) with sqrt(edge)? $\endgroup$ – kairavichahal Nov 11 '13 at 18:20
  • $\begingroup$ It means that the first set of coordinates in the answer give an edge length of 2. For a tetrahedron with edge length 1, just divide all the above coordinates by 2, etc (including the $\pm 1$ coordinates). $\endgroup$ – Old John Nov 11 '13 at 18:23
14
$\begingroup$

I happened to have a suitable image on my laptop (for my freshman course), so I couldn't resist methane molecule

It is supposed to be a methane molecule as opposed to a tetrahedron, so think of the hydrogen atoms (green) as vertices of the tetrahedron. As you see, this is the second arrangement in Old John's (+1) answer. One vertex is at the point $(1,1,1)$ and the other three at the points $(\pm1,\pm1,\pm1)$ with exactly two minus signs occuring. In other words, four selected corners of a cube.

I second Old John's opinion that this is very well suited for 3D-rotations, because you surely know the effect of a rotation on the cube...

$\endgroup$
  • $\begingroup$ Very nice! I have never mastered the art of creating nice images, unfortunately. $\endgroup$ – Old John Nov 11 '13 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.