Search This Blog

Showing posts with label clipping window. Show all posts
Showing posts with label clipping window. Show all posts

C Program for Polygon Clipping by Another Polygon - Computer Graphics Lab Program

Polygon clipping is one of the classic problem in computer graphics lab. Generally, polygons or whatever objects, are clipped by a rectangular clipping windows. But, this one is a little more challenging graphics lab experiment in which we have to clip polygon with another polygon. That is the clipping windows is actually another polygon. The following c program implements polygon clipping with another polygon. The program clips any polygon with the clipping polygon, given both should be convex polygons.