Page 77 - DCAP504_Computer Graphics
P. 77

Computer Graphics




                                         A rectangle object with coordinate values (2, 0) (5, 0), (5, 1) and (2, 1). Calculate the
                                         values of the rectangle  after  it is scaled 0.5 points  in X-direction and 1.5 in Y-
                                         direction. Plot the rectangle before and after applying the scaling in 2-D space or
                                         graph.


                          6.1.3   Reflection Transformation
                          Reflection transformation of a 2-D object creates a mirror image of the object either across the X or Y axis
                          of a 2-D space. The reflection transformation of an object is similar to scaling the object with a negative
                          scaling factor. The reflection transformation matrix to create:
                                                     −1   0
                                                         
                          1.  Reflection about the Y axis:    0  1 
                                                     1  0  
                                                         
                          2.  Reflection about the X axis:   0  −1 

                                                     −1  0  
                                                          
                          3.  Reflection about the origin:    0  −1 

                                                             0   1
                                                                 
                          4.  Reflection within the same quadrant:   1  0 


                                      The scaling factor while performing reflection transformation is 1, but the magnitude,
                                      i.e., -1 and +1 changes with respect to the type of reflection either about  X axis or Y
                                      axis.

                          When the reflection transformation matrix is multiplied with the point coordinates of a 2-D object the
                          respective reflections are obtained, which are as shown in table 6.1.

                                                        Table 6.1: Types of Reflections



                              Reflection             Original Object                  Reflected Object

                            About the Y
                            axis














                                                                                                      Contd...









                          70                      LOVELY PROFESSIONAL UNIVERSITY
   72   73   74   75   76   77   78   79   80   81   82