Tetrahedron sphere

from Red Blob Games
26 Apr 2021

Back in 2016, I was looking at covering a sphere in hexagons, and the way to do it was to take an isocahedron (20-sided polyhedron) and “inflate” it into a sphere. That can be covered in hexagons, plus 12 pentagons. I also explored covering the sphere in diamond tiles (inflating a cube), in square tiles (inflating a cube), and in voronoi polygons (starting from a fibonacci spiral). But one of the things I had pondered back in 2016 was inflating a tetrahedron, as it seemed like that would allow either triangle or square tiles.

So here’s a quick & dirty visualization of what it’d look like.


Inflate into sphere:

The grid lines all seem to line up properly, so that means we can have a square tile grid on a tetrahedron, I think. I need to unfold this to make sure.

There are two north triangles (green, purple) and two south triangles (yellow, pink). When moving north, you’ll walk on a north triangle, pass the north pole, which is an edge, and walk back on the other north triangle. Similarly, you’ll pass the south pole and end up on another triangle, but still on the square grid. Will there be issues at the corners? It’ll certainly be a little bit odd, because walking north then west will take you back to where you started.

Inflating the tetrahedron shows that the distortions are severe at the four corners. That’s expected. The main advantage of the tetrahedron is that the tile map can be stored in a single 2d array:

0123
  1. Left/right wraparound is simple: set x = x % 2.
  2. Top/bottom wraparound is relatively simple too: set x = 2-x and leave y alone, and flip the player’s camera to point south instead of north or vice versa. Moving up from triangle 1 leads to triangle 3 and vice versa; moving down from triangle 0 leads to triangle 2 and vice versa.

I don’t know if I’ll use this for anything but it was fun to explore.

Email me , or tweet @redblobgames, or comment: