Page 74 - DCAP504_Computer Graphics
P. 74

Unit 6: 2-D Transformation




               The figure 6.3 depicts the translation transformation in a 2-D space.

                                     Figure 6.3: Translation Transformation in a 2-D Space





                                                                        (2, 5)























               6.1.2    Scaling Transformation
               Scaling transformation is done to resize the object, i.e. the dimension of the object is changed. The object
               is scaled in the X direction of the 2-D graph, by multiplying all the X coordinate points of the object by a
               scaling factor Sx. Similarly, the Y coordinates of all the points of the object are multiplied by the scaling
               factor Sy. These scaling factor values define the amount by which the object has to be scaled in X and Y
               direction.

                           You can use same or different scaling factor values for X and Y coordinates, while
                           scaling the object.
                           1. If you use same scaling factor value for X and Y coordinates, uniform scaling of the
                           object takes place in X and Y directions.

                           2. If you use different scaling factor values, then uneven scaling takes place in X and Y
                           directions.

               The following is a simple matrix multiplication carried out to find the scaled coordinate (x’, y’).
                                                    S x  0                        x 
               Equation 6.1 is the product of scaling matrix    and point coordinate matrix     
                                                   
                                                          
                                                     0   y S                      y 
                       Sx  0    x  
                ( x ,'  y )'  =           
                         0  Sy     y  

                       
                       =   Sx  x  + 0    
                       
                        0  + Sy  y 
                       
                 x(  ) ' y , '  =   Sx x   …………………….. (Eq.6.1)
                       
                           
                        Sy y 



                                        LOVELY PROFESSIONAL UNIVERSITY                           67
   69   70   71   72   73   74   75   76   77   78   79