# Mapping a sphere to a tetrahedron? [closed]

If I have an approximation of a sphere, how do I map the vertices of the sphere to form a (regular) tetrahedron?

My current approach maps all vertices of the sphere to just one of the four vertices of a tetrahedron. However I want them to be evenly spaced, if that is possible.

I would be thankful for any approach or solution.

EDIT: Changed "rectangular" to regular.

## closed as unclear what you're asking by Stefan Mesken, Watson, астон вілла олоф мэллбэрг, Shailesh, Willie WongNov 9 '16 at 1:20

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I don't know what 'vertices of a sphere' are. Can you explain a little more? – Alfred Yerger Nov 7 '16 at 22:46
• I guess your vertices are a finite set of points that happen to be on the sphere, right ? Are those already evenly spaced on the sphere ? – justt Nov 7 '16 at 22:50
• oh yeah also, how are the coordinates of the points encoded ? Eulidean ? Spheric ? – justt Nov 7 '16 at 22:51
• What is a "rectangular" tetrahedron? – David K Nov 7 '16 at 22:57
• Yes, i have a finite set of points. I use them to render the sphere in my program. The coordinates are given as cartesian coordinates. so (x,y,z). – noobprogrammer Nov 7 '16 at 22:58

Assume the sphere is centered in 0, radius 1.

Let $x_1,y_1,z_1, ... x_4, y_4, z_4$ be the vertices of the dual tetrahedron : $(\pm 1, 0, -1/\sqrt{2}),\,\,\,\,\, (0, \pm 1, 1/\sqrt{2}).$. Let $(x,y,z)$ be a point of the spheres. Compute the dot products $x_ix+y_iy+z_iz$ for i=1..4. Find the $i$ for which it is positive and maximal. This tells us which face of the tetrahedron we should look at. Suppose for now that $i=1$.

Then we want to project on the face orthogonal to $x_1,y_1,z_1$. Let $\alpha$ the factor we want to multiply $(x,y,z)$ with. We want $\alpha(x,y,z)$ to belong to the plane orthogonal to $(x_1,y_1,z_1)$ and passing through it. This is equivalent to "$\alpha(x,y,z) - (x_1,y_1,z_1)$ orthogonal to $(x_1,y_1,z_1)$", equivalent to (by taking dot product) $\alpha(xx_1 + yy_1 +zz_1) = (x_1^2 + y_1^2 +z_1^2)$.So $\alpha = \frac {x_1^2 + y_1^2 +z_1^2}{xx_1 + yy_1 +zz_1}$.

Same if $i\neq 1$.

• I edited because i wasn't projecting correctly in a first version. – justt Nov 8 '16 at 0:35
• edited again since i had forgot to remove the bad part in a first edit. – justt Nov 8 '16 at 0:39

The naive approach would be to put the center of your "sphere" and of your tetrahedron in the point $(0,0,0)$, and then for every "vertice of the spehere" $v_n$ find the intersection of the line segment $[0,v_n)$ with the tetrahedron. Call this intersection $t_n$, and thus your map becomes $v_n\mapsto t_n$.

The term "evenly spaced" requires some clarifications, both involving the nature of your sphere approximation, shape of tetrahedron, and what are the desired properties of this map.

• Maybe evenly spaced wasn't the right term. I have the vertices of a my "sphere". I want to transform the sphere to a tetrahedron by just changing the distance of the vertex to the origin. – noobprogrammer Nov 7 '16 at 23:13

Can you map a cube inside a sphere? Now choose a vertex, and the 3 non-adjacent vertices, and you have a regualar tetrahedron.

e.g.

$(\frac {\sqrt 3}{3},\frac {\sqrt 3}{3},\frac {\sqrt 3}{3})\\ (-\frac {\sqrt 3}{3},-\frac {\sqrt 3}{3},\frac {\sqrt 3}{3})\\ (\frac {\sqrt 3}{3},-\frac {\sqrt 3}{3},-\frac {\sqrt 3}{3})\\ (-\frac {\sqrt 3}{3},\frac {\sqrt 3}{3},-\frac {\sqrt 3}{3})$

Following is a construct which sends every point other than origin to the surface of a tetrahedron containing origin in its interior. The distribution is not uniform, directions near the edges will be more spaced out than directions near center of the tetrahedron faces.

Given any tetrahedron $T$ containing origin $O$ in its interior.
Let $p_1, p_2, p_3, p_4$ be the its vertices ordered so that following 4 triples of vertices $$p_1p_2p_3,\quad p_1p_3p_4,\quad p_1p_4p_2\quad\text{ and }\quad p_2p_4p_3$$ are oriented counterclockwisely on its boundary $\partial T$. Let the corresponding faces be $F_4,F_2, F_3$ and $F_1$. i.e. $F_i$ is the face opposite to vertex $p_i$.

Consider face $F_4$, its outward pointing normal is pointing along the direction

$$v_4 = (p_2-p_1)\times(p_3-p_1) = p_1 \times p_2 + p_2\times p_3 + p_3 \times p_1$$ For any point $p \in \mathbb{R}^3$, it is coplanar with $F_4$ when and only when $$v_4 \cdot p = \Delta_4 \iff \frac{v_4}{\Delta_4} \cdot p = 1 \quad\text{ where }\quad\Delta_4 = p_1 \cdot v_4 = p_1 \cdot (p_2 \times p_3) > 0$$ Define $v_1, \Delta_1$ for face $F_1$, $v_2, \Delta_2$ for face $F_2$ and $v_3, \Delta_3$ for face $F_3$ in a similar manner.

Now consider the mapping

$$\mathbb{R}^3 \setminus \{ O \} \ni p \quad\mapsto\quad \varphi(p) = \frac{p}{ \max\left\{ \frac{v_1\cdot p}{\Delta_1}, \frac{v_2\cdot p}{\Delta_2}, \frac{v_3\cdot p}{\Delta_3}, \frac{v_4\cdot p}{\Delta_4} \right\}} \in \mathbb{R}^3$$ Notice $T$ contains $O$ in its interior. For any $p$ other than $O$, there is always an $i$ such that $v_i \cdot p > 0$. This means the denominator in the definition of $\varphi(p)$ is positive. As a result, $\varphi(p)$ lies on the ray from $O$ to $p$.

It is clear for some $i$, the maximum of $\frac{v_i}{\Delta_i}\cdot p$ is reached. For that $i$, $\frac{v_i}{\Delta_i}\cdot \varphi(p) = 1$ and hence $\varphi(p)$ lies on the plane containing $F_i$. It is also clear for all $j$, $\frac{v_j}{\Delta_j}\cdot \varphi(p) \le 1$, this means $\varphi(p)$ actually belongs to some face $F_i \subset \partial T$.

Based on this, we can conclude the map $\varphi$ sends every point $p$ other than $O$ to the intersection of the ray $Op$ with the surface of tetrahedron $T$.

As a concrete example, consider the case $T$ is the regular tetrahedron with vertices at $$p_1 = (1,1,1),\quad p_2 = (1,-1,-1),\quad p_3 = (-1,1,-1)\quad\text{ and }\quad p_4 = (-1,-1,1)$$

One can works out $$v_1 = (-4,-4,-4),\quad v_2 = (-4,4,4),\quad v_3 = (4,-4,4)\quad\text{ and }\quad v_4 = (4,4,-4)$$ and $\Delta_1 = \Delta_2 = \Delta_3 = \Delta_4 = 4$. The map $\;\phi : \mathbb{R}^3 \setminus \{ O \} \to \partial T\;$ becomes

$$(x,y,z)\quad\mapsto\quad \frac{1}{\max(-x-y-z,-x+y+z,x-y+z,x+y-z)} (x,y,z)$$