COMPUTER GRAPHICS - Implement Sutherland Hodgeman polygon clipping algorithm.
Experiment No.07 A.1 Aim: Implement Sutherland Hodgeman polygon clipping algorithm. A.2 Prerequisite: 1. C Language. 2. Geometric Concepts. 3. Concept of 2D basic Transformations. 4. Clipping Concepts. A.3 Outcome: After successful completion of this experiment students will be able to, Apply the transformations and clipping algorithms on graphical objects. A.4 Theory: The Sutherland-Hodgman algorithm clips a polygon against all edges of the clipping region in turn. The Sutherland - Hodgman algorithm performs a clipping of a polygon against each window edge in turn. It accepts an ordered sequence of verices v1, v2, v3, ..., vn and puts out a set of vertices defining the clipped polygon. This figure represents a polygon (the large, solid, upward pointing arrow) before clipping has occurred. The following figures show how this algorithm works at each edge, clipping the polygon. Clipping against the left side of the clip window. Clipping against the top side of the clip