The painter's algorithm is one of the simplest solutions to the visibility problem in 3D computer graphics. When projecting a 3D scene onto a 2D plane, it is at some point necessary to decide which polygons are visible and which are hidden. The distant mountains are painted first, followed by the closer meadows; finally, the closest objects in this scene - the trees - are painted. For detailed scenes, the painter's algorithm generally proves to be a slow solution.
Illustration credit: Fredrik |