Page 150 - DCAP504_Computer Graphics
P. 150

Pawan Kumar, Lovely Professional University                         Unit 10: Clipping II




                                            Unit 10: Clipping II


               CONTENTS
               Objectives
               Introduction

               10.1 Polygon Clipping
               10.2 Projection
               10.3 Summary
               10.4 Keywords
               10.5 Self Assessment
               10.6 Review Questions

               10.7 Further Readings
               Objectives

               After studying this unit, you will be able to:
               •    Explain polygon clipping

               •    Discuss projections
               Introduction
               The projection is transforming of points and lines from one plane to the other plane. The projections are
               done by connecting the corresponding points on two planes.




                             In projection it is important to control:
                Did you know?
                                 1. Projection type that can be perspective or orthographic.
                                 2. Field of view and aspect ratio of image.

                                 3. Near and far clipping panes.

               In this unit, you will learn the third most common types of clipping, that is, polygon clipping. You will
               learn various clipping algorithms that are developed for extracting a part of a defined scene for
               viewing, displaying multi-window environment, drawing, painting, and so on. At the end of this unit
               you will learn  about projection, which  helps transform 3-dimensional (3-D) objects on to a 2-
               dimensional (2-D) projection plane. The projection is considered as the solution to the mismatch
               between 3-D objects and 2-D displays.
               10.1   Polygon Clipping
               A polygon comprises a set of lines. A polygon is formed by placing the line segments on the plane
               where in each line segment shares its endpoints with other line segment and thus  forming a  closed
               region on the plane. Here, you need to modify the line clipping algorithm to clip the  polygon. The
               polygon is tested to see if it  is within the display window. The polygon edges are clipped that lie
               outside the window boundary. The edge segments that  are outside the  window are  clipped. The
               polygon edges must be handled in sequence. The clipping polygon is of two types, namely concave
               polygon and convex polygon.





                                        LOVELY PROFESSIONAL UNIVERSITY                          143
   145   146   147   148   149   150   151   152   153   154   155