title: Recommend some Bresenham's-like algorithm of sphere mapping in 2D?
body: <p>I need the fastest sphere mapping algorithm. Something like Bresenham's line drawing one.<br>
  Something like the implementation that I saw in Star Control 2 (rotating planets).<br>
  Are there any already invented and/or implemented techniques for this?  </p>
  
  <p>I really don't want to reinvent the bicycle. Please, help...  </p>
  
  <p><strong>Description of the problem.</strong><br>
  I have a place on the 2D surface where the sphere has to appear. Sphere (let it be an Earth) has to be textured with fine map and has to have an ability to scale and rotate freely. I want to implement it with a map or some simple transformation function of coordinates: each pixel on the 2D image of the sphere is defined as a number of pixels from the cylindrical map of the sphere. This gives me an ability to implement the antialiasing of the resulting image. Also I think about using mipmaps to implement mapping if one pixel on resulting picture is corresponding to more than one pixel on the original map (for example, close to poles of the sphere). Deeply inside I feel that this can be implemented with some trivial math. But all these thoughts are just my thoughts.</p>
  
  <p>This question is a little bit related to this one: <a href="https://stackoverflow.com/questions/213147/textured-spheres-without-strong-distortion">Textured spheres without strong distortion</a>, but there were no answers available on my question.</p>
  
  <p><strong>UPD:</strong> I suppose that I have no hardware support. I want to have an cross-platform solution.</p>