How to make a spherical world

I might like to write some code to create a generic game world inspired by the one scene in Kotodama, as in this image: … uboshi.jpg

There’s code in a number of places on the forum for creating and rendering a flat or heightmap-based section of geometry. My maths is not up to it, but there must be a simple way to transform such a flat grid into a sphere in 3D, some mathematical transformation that you can apply to each point in the grid in order to produce it’s spherical counterpart. Anyone got any ideas?

Some generic heightmap rendering code (as already posted elsewhere) combined with this transform would allow generic sphere worlds to be created. These might work quite well as most of the sphere is off-screen at any given time, so the framerate should be quite good.

After that, it’d just be a case of coding an avatar that can walk around on the sphere, colliding with the geometry.