Page 151 - DCAP504_Computer Graphics
P. 151

Computer Graphics



                          The polygon is said to be concave when a line is obtained after joining the two interior points of the
                          polygon which lies totally inside the polygon. Where as polygon is said to be convex when there is at
                          least one pair of point such that the line joining the points inside the polygon does not lie completely
                          inside the polygon. The figure 10.1 provides a clear idea of concave polygon and figure 10.2 provides a
                          clear idea of convex polygon.


                                                       Figure 10.1: Concave
                                                           Polygon












                                                       Figure 10.2: Convex
                                                           Polygon

















                          The polygon clipping can be further explained using the following two algorithms.
                          1.  Sutherland-Hodgeman Algorithm
                          2.  Weiler-Atherton Algorithm
                          Sutherland-Hodgeman Algorithm
                          Polygon clipping is relatively straightforward and can be easily implemented. Sutherland-Hodgeman
                          algorithm uses the divide and conquer strategy to solve the problem related to polygon clipping. First,
                          this algorithm clips the part of the polygon that is adjacent to the right or left clipping boundary. Then,
                          this partly clipped polygon is clipped against the top boundary and the same process is repeated for the
                          two remaining boundaries.























                          144                     LOVELY PROFESSIONAL UNIVERSITY
   146   147   148   149   150   151   152   153   154   155   156