http://www.perlmonks.org?node_id=1068800


in reply to color problem

There will be three points-of-interest in the geometry: All of this math lets you determine, at any point in time, whether a given planet is visible to the camera, where it appears on the camera's film, and how far away from the camera it is. You then sort this display-list in descending order by z-order, and draw it.