0
2.4kviews
Explain Weiler -atherton polygon clipping algorithm in detail

Mumbai University > Computer Engineering > Sem 6 > Computer Graphics

Marks: 10 Marks

Year: Dec 2016

1 Answer
1
38views
  1. Sutherland-Hodgeman algorithm requires a convex polygon.
  2. In context of many applications, e.g., hidden surface removal, the ability to clip the concave polygon is required. A powerful but somewhat more complex clipping algorithm developed by Weiler and Atherton meets this requirement.
  3. This algorithm defines the polygon to be clipped as a subject polygon and the clipping region as the clip polygon.
  4. The algorithm describes both the subject and the clip polygons by a circular list of vertices.
  5. The boundaries of the subject polygon and the clip polygon may or may not intersect.
  6. If they intersect, then the intersections occur in pair.
  7. One of the intersections occurs when a subject polygon edge enters the inside of the clip polygon and one when it leaves.
  8. As shown in figure below, there are four intersection vertices I1.I2,I3 and I4.
  9. In these intersections I1 and I3 are entering the intersections, and I2 and I4 are leaving the intersections.

enter image description here

  1. The clip polygon vertices are marked as C1,C2,C3 and C4.
  2. In this algorithm two separate vertices lists are made, one for clip polygon and other for the subject polygon including intersection points.
  3. The table below shows these two lists for polygon shown above.

    enter image description here

13.The algorithm starts at an entering intersection (I1) and follows the subject polygon vertex list in the downward direction (i.e. I1, V3, V4, I2).

14.At the occurrence of leaving intersection the algorithm follows the clip polygon vertex list from the leaving intersection vertex in the downward direction (i.e. I2, I1).

15.At the occurrence of entering intersection the algorithm follows the subject polygon vertex list from the entering intersection vertex.

16.This process is repeated until we get the starting vertex. This process we have to repeat for all remaining entering intersections which are not included in the previous traversing of vertex list.

17.In our example, entering vertex I3 was not included in the first traversing of vertex list. Therefore, we have to go for another vertex traversal from vertex I3.

18.The above two vertex traversal gives two clipped inside polygons. They are: I1, V3, V4, I2, I1 and I3, V5, I4, I3.

Please log in to add an answer.