beero1000
Veteran Member
Well... everywhere.The distance to which part of the tetrahedron? Faces, edges, vertices?
How about just the distance from the origin, to an equilateral triangle that is orthogonal to the x-axis, pointed up (y is up for me...). Then a rotation matrix to reach one of the other faces. I'll figure it out from there.
It's for art man. Art! Unless you think easy transforms between Platonic solids are something that can be used for nefarious purposes.
Well, fine then.
Suppose the side length is \(s\). The Pythagorean theorem shows that the circumsphere radius is \(R = \sqrt{\frac{3}{8}}s\) and the insphere radius is \(r = \sqrt{\frac{2}{3}}s - \sqrt{\frac{3}{8}}s = \frac{1}{\sqrt{24}}s\). These are the shortest distances from the center to a vertex and a face respectively. If you want the midsphere radius, you get \(r_m = \frac{1}{\sqrt{8}}s\), which is the shortest distance to an edge.
If you want coordinates, it's often easiest to take the tetrahedron inscribed in the cube. Take 4 non-adjacent cube vertices, say (1, 1, 1), (1, 0, 0), (0, 1, 0) and (0, 0, 1). They form the vertices of a regular tetrahedron with side length \(\sqrt{2}\). Convex combinations of the vertices give arbitrary points in and on the tetrahedron, where the number of zero coefficients determines whether the point is interior, on a face, an edge, or a vertex.