The TOAST Projection

TOAST (Tessellated Octahedral Adaptive Subdivision Transform) is an extension of as system of representing a sphere as a hierarchical triangular mesh. The extension takes the mesh and flattens it into a square for use as a texture.

Approximating a Sphere๐Ÿ”—

A Hierarchical Triangular Mesh (HTM) is a representation of a sphere proposed by astronomers in the Sloan Digital Sky Survey. It first models the sphere as an octahedron, then recursively subdivides each triangular face until the sphere is closely approximated by a highly tessellated polyhedron. WorldWide Telescope extends the concepts of HTM, where the subdivided octahedron is folded out flat into a square.

The recursive subdivision of tiles using an HTM system is shown in the following images. Basically, a sphere is modeled as a polygon (starting with an octahedron) that has lots of triangular faces. If the octahedron was folded flat, the North pole would be at the center, the south pole at each of the four corners, and the equator would form a diamond within the square.

The following images shows the first three levels of HTM subdivision. As each side is subdivided the new point would be on the surface of a perfect sphere. Even after just three iterations the polyhedron is getting close to approximating a sphere.

ImageFlat
ย ย 
ย 

Image credits: Jonathan Fay, Tom McGlynn (NASA SkyView)

TOAST Map of Earth๐Ÿ”—

When the equirectangular earth map is converted to TOAST, it looks like the following:

Toast Map

The unusual warping in this image can be interpreted. The North Pole is in the center, and Antarctica split into four at the corners. In fact, all four corners meet at exactly the same point โ€“ the South Pole. The Equator follows a square whose corners are the middle of each side (shown by a red line in the image). The wrap-around in TOAST is shown in the following image. Each point on the side of the TOAST square, for example, A, B, C and D, will be adjacent to the points A, B, C and D when the projection is mapped onto a sphere.

Toast Map

The following images show the process a little simpler. The 1000 x 500 pixel equirectangular image on the left produces the TOAST projection on the right, and if the collection file produced by the Sphere Toaster tool (with the output set to Planet) is loaded into WorldWide Telescope, the planet in the lower image will appear:

Inside and Outside Projections๐Ÿ”—

Right ascension and longitude values in TOAST depend on whether the projection is being used to represent the inside or outside of a sphere. Notice that the degrees of RA/longitude are on the opposite sides in the following two diagrams.

The inside of a sphere

The outside of a sphere

The resolution of a TOAST image is not even across the square, for example the following three lines all represent one circumference of the sphere, yet all three lines are of different lengths (2L * sqrt(2), 2L, and L * sqrt(2) respectively, where L is the length of one side of the square). This difference in resolution across a single image is still far less than that of equirectangular projection.

Image Pyramids๐Ÿ”—

The TOAST representation of a sphere can be a rather large square, so it is stored as an image pyramid. In this image pyramid, each lower level contains a higher-resolution version of the total image. One level down has twice the width and twice the height (so four times a greater area) of the image in the previous level. At each level, the image is tiled into 256ร—256 images. The purpose of having image pyramids is that as the viewer gets closer and closer to an object (a galaxy, for example) the rendering of that object becomes progressively more detailed. Alternatively as the viewer moves away from an object, less and less computing power is needed to render the image as lower levels of the image pyramid are used. The first level is a single 256 by 256 tile, which is obviously used when the view is at its maximum (perhaps looking at the stars from the Earth). At level 7, the default deepest level, there are 128ร—128 (16384) tiles.

LevelNumber of TilesHeight, or Width, of the Total Image in pixelsApproximate TOAST Resolution (arcmin/pixel)
0125642.19
1451221.09
2161,02410.55
3642,0485.27
42564,0962.64
51,0248,1921.32
64,09616,3840.66
716,38432,7680.33
865,53665,5360.165
9262,144131,0720.0825
101,048,576262,1440.04125
114,194,304524,2880.020625