Assignment 2

AIM:To implement the Sutherland-Hodgman algorithm for clipping polygons.

Read the description of the clip polygon from the input file. The first polygon description of the file is that of the clip polygon.

Read the description of the other polygons from the input file and clip each of them against the clip polygon and draw the resulting clipped polygon. As in your previous assignment, just overwrite the previous polygon as you go through the list of polygons given.

Marks: 10