Painter's algorithm: Difference between revisions

Content deleted Content added
Punctuation and grammar changes to Advantages section. (Previous punctuation and grammar changes were overwritten)
Cyclical Overlapping: Added citations
Line 34:
The algorithm can fail in some cases, including cyclic overlap or piercing polygons.
=== Cyclical Overlapping ===
In the case of cyclic overlap, as shown in the figure to the right, Polygons A, B, and C overlap each other in such a way that it is impossible to determine which polygon is above the others. In this case, the offending polygons must be cut to allow sorting. [[Newell's algorithm]], proposed in 1972, provides a method for cutting such polygons.<ref name=":0" /> Numerous methods have also been proposed in the field of [[computational geometry]].
 
=== Piercing Polygons ===
The case of piercing polygons arises when one polygon intersects another. As with cyclic overlap, this problem may be resolved by cutting the offending polygons.<ref name=":0" />
 
=== Efficiency ===