Skip to main content
6 of 15
added 8 characters in body

Mapping a Cube to a Sphere

I have been looking for a way to map a unit cube ($x^{2}=y^{2}=z^{2}=1$) to a unit sphere ($x^{2}+y^{2}+z^{2}=R^{2}=1$) with minimal distortion of the great circles formed by mapping the coordinate lines on the cube face. As can be seen from the following picture, a simple radial contraction onto the sphere surface leads to large visible distortion of the great circles.

enter image description here

Radial contraction onto sphere

Phil Nowell here derived an elegant mapping that generates a much more uniform subdivision of the great circles.

Nowell mapping

Nowell mapping

However, close inspection shows that there is still some room for improvement. Points near the center of the cube faces get more compressed than those near the edges.

By using the rotation of central planes to map points on the cube to equidistant points on the sphere, I was able to come up with the following expressions for an improved mapping: $$ \begin{cases} x_\text{sphere}=x_{c}/\sqrt{x_{c}^{2}+ y_{c}^{2}+ z_{c}^{2}}\\ y_\text{sphere}=y_{c}/\sqrt{x_{c}^{2}+ y_{c}^{2} + z_{c}^{2}}\\ z_\text{sphere}=z_{c}/\sqrt{x_{c}^{2}+ y_{c}^{2} + z_{c}^{2}} \end {cases} $$

where $$ \begin{cases} x_{c}=\sqrt{x^{p}+y^{2}+z^{2}} \tan\left(x \arctan\left(\dfrac{1}{\sqrt{x^{p}+y^{2}+z^{2}} } \right)\right)\\ y_{c}=\sqrt{x^{2}+y^{p}+z^{2}} \tan\left(y \arctan\left(\dfrac{1}{\sqrt{x^{2}+y^{p}+z^{2}} } \right)\right)\\ z_{c}=\sqrt{x^{2}+y^{2}+z^{p}} \tan\left(z\arctan\left(\dfrac{1}{\sqrt{x^{2}+y^{2}+z^{p}} } \right)\right) \end{cases} $$

  • $p$ is a large even integer and
  • $x$, $y$, $z$ are the coordinates of the cube.

The picture below is obtained with $p=50$

enter image description here

Improved mapping

To express the quality $Q$ of the mapping, I calculate the ratio of the maximum and minimum length of a line segment on the most distorted great circle, as follows: $$ Q = \frac{\ell_\min}{\ell_\max}\cdot 100\%, $$ so that an optimum distribution gives a quality of 100%.

With this, the quality of the radial contraction becomes 58%, that of Nowell’s mapping becomes 79% and that of my improved mapping becomes 96%. It is also worth noting that the quality on the central coordinate lines and the edges is 100%.

Now, my question is: “can my mapping be improved further to yield a quality of 100% everywhere on the sphere?”