0
894views
Write the Sutherland-Hodgeman polygon clipping algorithm. Explain the modification given by Weiler and Atherton for a concave polygon.

Write the Sutherland-Hodgeman polygon clipping algorithm. Explain the modification given by Weiler and Atherton for a concave polygon.

1 Answer
0
47views


Sutherland-Hodgeman polygon clipping algorithm :-

  1. Read coordinates of all vertices of the polygon.
  2. Read coordinates of the clipping window.
  3. Consider the left edge of the window.
  4. Compare the vertices of each edge of the polygon, individually with the clipping plane.
  5. Save the resulting intersections and vertices in the new list of vertices according to four possible cases between the edge and the clipping boundary.
  6. Repeat the step 4 and 5 for remaining edges of the clipping window. Each time the resultant list of vertices is successively passed, move the process to the next edge of the clipping window.
  7. Stop.



Weiler-Atherton polygon clipping :-

  1. In this algorithm, the vertex processing procedure is modified so that the concave polygons are displayed correctly.
  2. This algorithm depends on identifying surfaces as shown in Fig. 2.24.1.
  3. There are two directions (clockwise or anticlockwise) that exist to process the polygon vertices.
  4. For clockwise processing of polygon vertices, we use the following rules :

    a. For an outside to inside pair of vertices, follow the polygon boundary.

    b. For an inside to outside pair of vertices, follow the window boundary in a clockwise direction.


enter image description here

Please log in to add an answer.