Page 103 - DCAP504_Computer Graphics
P. 103

Computer Graphics





                          The scale factors (Sx, Sy) are:
                                 xv max  −  xv min
                          S =
                            x
                                xw max  −  xw min

                                 yv max  −  yv min
                          S y  =
                                 yw max  −  yw min
                          The translation factors (Tx, Ty) are:

                                xw max xv min  −  xw min xv max
                          t =
                           x
                                      xw max  −  xw min


                                yw max yv min  −  yw min yv max
                          t y  =      yw max  −  yw min


                          In the interface window, the position of the viewport can be changed by allowing objects to be viewed
                          at different positions. Multiple viewports can also be used to display different sections of a scene at
                          different screen positions. To manipulate the size and proportion of the object, the dimensions of the
                          viewport must be changed.  By mapping different dimensioned clipping windows on a fixed sized
                          viewport, a zooming effect is being given to the object. The image will have a vague look if the aspect
                          ratio of the world window and the viewport are different.
                          Tiling Using the Window-to-Viewport Transformation
                          Tiling is defined as the number of copies drawn of the same image in rows and columns across the
                          interface window so that they cover the entire window. A picture that has been copied several times is
                          called a motif. In computer graphics, tiling is acquired by keeping the window static and changing the
                          viewport several times. The picture is redrawn every time the viewport is changed.




































                          96                      LOVELY PROFESSIONAL UNIVERSITY
   98   99   100   101   102   103   104   105   106   107   108