EX NO :13 SUTHERLAND HODGEMAN ALGORITHM
To clip a Polygon using Sutherland Hodgeman Algorithm.
1. Input Coordinates of all vertices of the polygon
2. Input 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 relationships between the edge and the clipping boundary discussed earlier
6. Repeat the steps 4 and 5 for remaining edges of the clipping window. Each time the resultant list of vertices is successively passed to process the next edge of the clipping window
7. Stop
RESULT : Thus the program is executed successfully.
0 comments:
Post a Comment