Painter's algorithm: Difference between revisions

Content deleted Content added
two special cases
mNo edit summary
Line 1:
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, at some point, you need to decide which [[polygon]]s are visible and which are hidden.
 
The name "painter's algorithm" refers to a simple-minded 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 first sort all the 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.