Content deleted Content added
mNo edit summary |
Citation bot (talk | contribs) Removed URL that duplicated identifier. Removed parameters. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox | #UCB_webform_linked 10/967 |
||
(21 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Short description|Algorithm for visible surface determination in 3D graphics}}
{{Distinguish|Schlemiel the Painter's algorithm}}
[[File:Genesis fractal landscape software (Commodore Amiga).webm|thumb|A [[fractal landscape]] being rendered using the
The '''
The painter's algorithm was initially proposed as a basic method to address the
== Algorithm ==
Line 20:
=== Time complexity ===
The painter's algorithm's time-complexity
=== Space complexity ===
Line 26:
== Advantages ==
There are two primary technical requisites that favor the use of the
=== Basic graphical structure ===
The painter's algorithm is not as complex in structure as its other depth sorting algorithm counterparts.<ref name=":1" /><ref>{{Cite journal|last=Warnock|first=John E.|date=1969-06-01|title=A Hidden Surface Algorithm for Computer Generated Halftone Pictures|url=https://apps.dtic.mil/sti/citations/AD0753671|archive-url=https://web.archive.org/web/20201108193625/https://apps.dtic.mil/sti/citations/AD0753671|url-status=live|archive-date=November 8, 2020|language=en}}</ref> Components such as the depth-based rendering order, as employed by the
=== Memory efficiency ===
In the early 70s, when the
== Limitations ==
[[File:Painters problem.svg|thumb|Overlapping polygons can cause the algorithm to fail.]]
The algorithm can fail in some cases, including cyclic overlap or piercing polygons.
Line 45 ⟶ 46:
=== Efficiency ===
In basic implementations, the painter's algorithm can be inefficient. It forces the system to [[rendering (computer graphics)|render]] each point on every polygon in the visible set, even if that polygon is occluded in the finished scene. This means that, for detailed scenes, the painter's algorithm can overly tax the computer hardware.
== Reducing visual errors ==
There are a few ways to reduce the visual errors that can happen with sorting:
=== Binary Space Partitioning ===
BSP is a method that involves making a BSP tree, and splitting triangles where they intersect. It can be extremely hard to implement, but it fixes most visual errors.
=== Backface culling ===
Backface culling involves calculations to see if a triangles points will appear clockwise or counter-clockwise once projected to the screen, and doesn't draw triangles that shouldn't be visible anyway. It reduces some visual errors, as well as reducing the total triangles drawn.
== Variants ==
Line 55 ⟶ 65:
== Other computer graphics algorithms ==
The flaws of painter's algorithm led to the development of [[Z-buffering|Z-buffer]] techniques, which can be viewed as a development of the painter's algorithm by resolving depth conflicts on a pixel-by-pixel basis, reducing the need for a depth-based rendering order.<ref>{{Cite book|last=Nyberg|first=Daniel|url=http://urn.kb.se/resolve?urn=urn:nbn:se:kth:diva-130849|title=Analysis of Two Common Hidden Surface Removal Algorithms, Painter
== References ==
|