Page 160 - DCAP313_LAB_ON_COMPUTER_GRAPHICS
P. 160

Lab on Computer Graphics                                          Kumar Vishal, Lovely Professional University



                   Notes                                    Unit 10: Shearing



                                   CONTENTS

                                   Objectives
                                   Introduction
                                   10.1  Shearing
                                       10.1.1  The X-Shear Transformation
                                       10.1.2  The Y-shear Transformation

                                       10.1.3  The Z-shear Transformation
                                       10.1.4  2D Transformations
                                   10.2  Rotation
                                   10.3  Reflection
                                       10.3.1  2D Transformations Such As Reflection Algorithms

                                   10.4  Summary
                                   10.5  Keywords
                                   10.6  Review Questions
                                   10.7  Further Readings

                                 Objectives

                                 After studying this unit, you will be able to:

                                    •  Define shearing with C programming
                                    •  Explain rotation with C programming

                                    •  Describe reflection with C programming
                                 Introduction


                                 A shearing transformation revolves one axis in order that the x-axis and y-axis are no longer
                                 perpendicular. The coordinates of the node are moved by the specified multipliers. To shear,
                                 use the Shear class or the shear function of the Transform class. In the Xylophone application,
                                 you can shear the xylophone by pulling the mouse while holding Shift and pressing the left
                                 mouse button.

                                 10.1 Shearing


                                 Shearing  transformations  in  three-dimensions  alter  two  of  the  three  coordinate  values
                                 proportionally to the value of the third coordinate.
                                 10.1.1 The X-Shear Transformation
                                                   
                                                       , )
                                 Given a frame F =  (, ,uv wO  we “x-shear” a frame by modifying the first vector of the frame
                                 by including to it a linear arrangement of the other two vectors. The frame transformation takes
                                 the following form:




        154                               LOVELY PROFESSIONAL UNIVERSITY
   155   156   157   158   159   160   161   162   163   164   165