Painter's algorithm: Difference between revisions

Content deleted Content added
m formatting
The '''Painter's algorithm'''
Line 1:
The '''Painter's algorithm''' is one of the simplest solution to the [[visibility problem]] in [[3D graphics]]. When projecting 3D scene into a 2D plane, at some point, you need to decide which [[polygon]]s are visible and which are hidden.
 
The name "painter's algorithm" references to a silly painter who paints the distant parts of a scene at first and then covers them by those parts which are nearer. Similarly, when you want to use this algorithm in your rendering system, you have to sort all thy polygons by their depth and then paint them in this order. You will over-paint the parts that are normally not visible and thus solve the visibility problem.