Weiler–Atherton clipping algorithm

The Weiler- Atherton algorithm is a method of computer graphics to masking calculation of polygons.

Operation

The first step of the Weiler- Atherton algorithm is to sort all the polygons approximately according to their z- coordinates. The polygon A, which is, according to this rough sorting the next, is now used to clip all polygons against A and split along its contour. This creates two lists: one "internal list " that contains all the polygon parts that are after projection from within the for clipping polygon A ( in the example picture on the right BINA ) and an " external list " with all the outlying parts (in the example image bouta ).

All polygons of the inner list that are located behind A are deleted because they are not visible. If, however, the viewer is one of the polygons of the inner list closer than A, it is because that the initial sorting has failed here. For each of these polygons, the polygon parts of the inner list will be tested to see if they are closer, and possibly clipped. This runs recursively. At the end of the process the inner list is updated accordingly. Subsequently, the polygons of the outer list are processed.

For the initial clipping and not split polygons are always used, because this requires less effort because of the usually simpler form of the original polygons. Therefore, the original polygon must be specified for each divided polygon.

In order to handle also the polygons which overlap each other, the algorithm uses a stack. This includes all for clipping polygons whose processing has been interrupted due to a recursive call. If a polygon is found, which is located before the current for clipping polygon, it is first searched in the stack. If it was already registered there, no recursion is necessary, since all polygonal parts have been removed within and behind this polygon.

815573
de