Content deleted Content added
m Date the maintenance tags using AWB |
No edit summary |
||
Line 1:
'''Weiler-Atherton''' [[clipping]] algorithm used in [[Computer graphics]].
It allows clipping of a ''subject polygon'' by an arbitrarily shaped ''clip polygon''. It is generally applicable only in [[2D]].▼
▲It allows clipping of a ''subject polygon'' by an arbitrarily shaped ''clip polygon''.
▲'''Draft Description'''
Requires polygons to be clockwise and not re-enterant (self intersecting)
Line 19 ⟶ 14:
If there are no intersections then one of three situations exist:
▲2) B is inside A - return B for clipping, A for merging.
▲3) A and B do not overlap - return None for clipping or A & B for merging.
A list of inbound intersections is then generated. Each intersection in the list is then followed clockwise around the linked lists until the start position is found. One or more concave polygons may produce more than one intersecting polygon. Convex polygons will only have one intersecting polygon.
Line 34 ⟶ 26:
Points on the edge of the polygon may be considered as both in and out until their status can be confirmed after the intersections have been found and verified, however this increases the complexity.
== References ==
*See HIDDEN SURFACE REMOVAL USING POLYGON AREA SORTING - Kevin Weiler and Peter Atherton [http://www.cs.drexel.edu/~david/Classes/CS430/HWs/p214-weiler.pdf]
*[1] http://www.cs.drexel.edu/~david/Classes/CS430/HWs/p214-weiler.pdf
|