This is an example of "Surface of Rotation" rendering of a bitmap. In this case, the surface represents a sphere. This can be easily driven by an external "Surface Map" file controlling the "Lathe" for each line width. The original code came from my 80x86 assembly language routine that does the same thing, but literally "On-the-Fly" including scaling, lighting and shading and moving through space for a fly-by.
This technique is based on each horizontal slice being composed of a spoked disk of colors (as represented by the bitmap). As each spoke is examined, if that spoke extends beyond the previous spoke, then that number of pixels are drawn and the process repeats until the bitmap width (or 1/2 of the width, if mapping to a sphere) is complete. Each spoke usually has a constant radius, but can have a varied radius, if the bitmap has "Radius Map" of the same dimensions as the bitmap. This radius map can also be internally generated to provide a "bumpy sphere" like a golf ball or an orange. Likewise, close to anything can be modeled using this technique. From cones to cylinders and even 3D heads.