Page 88 - DCAP504_Computer Graphics
P. 88

Unit 6: 2-D Transformation



               Inverse Transformation
               It is possible  to obtain the original coordinate values of an object from  its  transformation. This is
               achieved using inverse matrix. The matrix multiplication of the coordinate values of the transformed
               object with the respective inverse transformation matrix, gives the original coordinate values of the
               object.
               Let us assume that P’ is a point coordinate of an object after transformation, T is the transformation
               matrix, and P is the original coordinate of the object. The inverse of a transformation matrix T is T .
                                                                                             -1
               Then, P= T .P’
                        -1
               The inversion transformation matrices of various transformations are:

                                      1  0  − dx  
                                      
               Inverse translation matrix = 0  1  − dy 
                                              
                                       0  0  1  
                                    1      
                                       0    0
                                     Sx    
                                   
               Inverse scaling matrix = 0  1  0 
                                       Sy  
                                     0  0  1 
                                           
                                           
                                     cos θ  sin θ   0 
                                    
               Inverse rotation matrix =  − sin θ cos θ   0
                                                
                                      0    0   1 

                                   1  − a   0 
                                   
               Inverse X-shear matrix= 0  1   0
                                          
                                    0  0  1 
                                    1  0   0 
                                   
               Inverse Y-shear matrix=  − b  1   0
                                          
                                     0  0  1 

                                  The homogeneous coordinates of a rectangle scaled by a scaling factor 0.5 in X
                                  and Y directions are [0 0 1], [1 0 1], [1 1 1], and [0 1 1]. To find the homogeneous
                                  coordinates of the original  rectangle (i.e. before scaling), the homogeneous
                                  coordinates of the scaled rectangle need to be individually multiplied with the
                                  inverse scaling matrix.
                                  Let the inverse scaling matrix with the scaling factor 0.5 in X and Y direction be
                                  S,

                                       1        
                                           0     0
                                        5 . 0   
                                   S =     0  1  0 
                                            5 . 0  
                                       0   0     1
                                                
                                                
                                      2  0   0 
                                      
                                   S =   0  2   0
                                            
                                       0  0  1 
                                  By multiplying the homogeneous coordinates of the scaled rectangle with the



                                        LOVELY PROFESSIONAL UNIVERSITY                           81
   83   84   85   86   87   88   89   90   91   92   93