Painter's algorithm

The painter algorithm (English painter's algorithm ) is a simple solution to the visibility problem in 3D computer graphics. In the case of the representation of a three-dimensional scene often decided on a two-dimensional needs which polygons are visible and which hidden.

The name painters algorithm is an allusion to a painter who draws the distant objects in the scene first and then painted over with the closer. Accordingly, the algorithm can be used in the implementation of a computer graphics application: First, all the polygons are sorted by their depth and then they are drawn in sequence ( depth sorting, Eng depth sort. ). By drawing over the image parts that are not normally visible, the visibility problem is solved.

This procedure leads to several problems. What happens if polygon A polygon in part B, B part C and C in turn partially overlaps A? It can not be decided which before which is polygon. A similar situation occurs when two polygons overlap each other in three-dimensional space. In such cases, at least one of the affected polygons must be divided so that the sorting is possible and the painter algorithm, a correct result.

Another problem is that the painter algorithm is inefficient because the computer must calculate the intensities of all points of a polygon, even if the polygon is not visible in the final scene.

These and other problems with the painter algorithm led to the development of the Z- buffer, which can be regarded as a logical development of the painters algorithm. By the use of a Z- buffer, the objects need not be rendered in the order of their depth.

  • Image synthesis
  • Algorithm (computer graphics )
541957
de