HW 2D CGA - PPT 6 - Polygon Clipping

Question 1 Solution: Sutherland-Hodgman Method We will be solving this problem with visual clipping so there will be no calculations. Below is the graph of the polygon before any clipping is done: Polygon before clipping First step is to clip at the top edge of the clipping window to get rid of any excess polygon above the window. The given polygon is polygon P with it's members p1, p2, p3, p4, p5, p6, p7, p8, and p9 . Below is the first step we take to clip the top edge: First clipping at TOP EDGE Firstly we check vector p1p2 on the graph, both of the start point and end point are inside of top edge so we will be taking the ending point as the new point of q1. We'll do that for all vectors of polygon P until the last vector p9p1, the start point is outside and end point is inside so we will be taking the intersection and end point as q8 and q9. From the first clipping we get a new Polygon Q with it's members q1, q2, q3, q4, q5, q6, q7, q8, and q9 in ...