Thursday 3 April 2014

CLIPPING OF POLYGON
Sutherland and hodgman polygon algorithm. 
  •  Read the co-ordinate of all the vertices of the polygon
  •  Read the co-ordinate of the clipping window .
  •  consider the left edge of the clipping window.
  •  Compare the vertices of each edge of the polygon indiviually with the clipping plane/window.
  •  Save the resulting intersection and the vertices into new list of the vertices according to the four possible relationship between then edge and clipping boundary.
  •  repeat step 4 and 5 for the remaining edges of the clipping window.
  •  Each time the resultant list of vertices is passed through the process with the next edge of the clipping window.

0 comments:

Post a Comment