Page 137 - DCAP504_Computer Graphics
P. 137

Computer Graphics



                          In this unit, you will learn the two  most common types of clipping, namely point clipping  and  line
                          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.
                          9.1    Overview of Clipping
                          Clipping, in  general, refers to the removal of  a part of a  scene. Imagine  a person seeing the  world
                          through the window of a house. The part of the scene that cannot be viewed from the window is called
                          as cut off portion or left out portion. In computer graphics, the portion that is left outside the clip
                          window is called the clipped part and the process used to display the image within the window is
                          called clipping. In general, a clipping algorithm is used to remove the image components that lie
                          outside the viewing window.

                          According to Peter Comninos, Director of Bournemouth's National Centre for Computer Animation,
                          "Clipping is a process that subdivides each element of a picture to be displayed into its visible and
                          invisible parts, thus allowing us to discard the invisible part of the picture."
                          Clipping algorithms can be applied in world co-ordinates such that only the picture of the object inside
                          the window is mapped to the device co-ordinates. Alternatively, the entire world co-ordinate picture is
                          first mapped to the device co-ordinate picture and then clipped against the viewport boundaries.

                          World co-ordinate clipping does not consider pictures outside the clipping window. Thus, it eliminates
                          the processing required to transform those pictures to device space. On the other hand, viewport
                          clipping reduces calculations by linking the viewing and geometric transformation matrices. This unit
                          discusses three primitive types of clipping. They are:
                          1.   Point clipping
                          2.   Line Clipping
                          3.   Polygon Clipping (Will be discussed in Unit-10)

                                      World co-ordinate is the  reference frame that is used to place the object in the
                                      appropriate position. This co-ordinate system is linear along both axes.






                                        Applications such as Word  processors  and Spreadsheets clip keyboard input to
                          Did you know?
                                        prevent the input from appearing in the margins of a page. Computer-Aided Design
                                        (CAD) programs clip graphics output  to prevent  the output from overwriting the
                                        edges of a drawing.

                          9.2   Point Clipping
                          How does point clipping work? Point clipping removes points that are outside the clipping window.
                          Assume that the clip window is rectangular. The point p(x, y) is  saved for  display, if the following
                          inequalities are satisfied:

                          xw min  ≤x ≤xw max
                          yw min  ≤y ≤yw max
                          where, xw min  and xw max are the edges of the clip window boundaries that are parallel to the y-axis and
                          yw min and yw max are the edges of the clip window boundaries that are parallel to the x-axis.






                          130                     LOVELY PROFESSIONAL UNIVERSITY
   132   133   134   135   136   137   138   139   140   141   142