Heightmaps are 2D rectangles representing the topography of a sphere. Spherical clipmaps are 2D rings projected onto a sphere as a partial sphere cap.
Heightmaps are defined by:
- Have a height (H) and width (W) with x,y coordinates centered at 0,0 at H/2, W/2.
- Cover some percentage of the circumference of the sphere (scaledPI)
- Points (x,y) on the heightmap map to a phi, theta (polar coordinates)
- The heightmap is centered on the sphere at phi,theta (polar coordinates)
- For a point in the heightmap, y maps to T(y) and x manps to P(x)
- T(y) = ( y / ( H / 2 ) * scaledPI ) + theta