Page 6 - Computer Graphics Handout
P. 6

3.6.5 Interpolation ................................................................................................................................................... 112

              3.6.6 Displaying the Cube ........................................................................................................................................ 112
            3.7 AFFINE TRANSFORMATIONS .................................................................................................................................. 113
            3.8 TRANSLATION, ROTATION, AND SCALING ............................................................................................................. 115

              3.8.1 Translation ...................................................................................................................................................... 115
              3.8.2 Rotation .......................................................................................................................................................... 115

              3.8.3 Scaling ............................................................................................................................................................. 117
            3.9 TRANSFORMATIONS IN HOMOGENEOUS COORDINATES ..................................................................................... 118

              3.9.2 Scaling ............................................................................................................................................................. 119
              3.9.3 Rotation .......................................................................................................................................................... 119

              3.9.4 Shear ............................................................................................................................................................... 121
            3.10 CONCATENATION OF TRANSFORMATIONS ......................................................................................................... 122
              3.10.1 Rotation About a Fixed Point ........................................................................................................................ 122

              3.10.2 General Rotation ........................................................................................................................................... 124
              3.10.3 The Instance Transformation ........................................................................................................................ 125

              3.10.4 Rotation About an Arbitrary Axis .................................................................................................................. 126
            3.11 TRANSFORMATION MATRICES IN OPENGL.......................................................................................................... 128

              3.11.1 Current Transformation Matrices ................................................................................................................. 129
              3.11.2 Rotation, Translation, and Scaling ................................................................................................................ 129

              3.11.4 Order of Transformations ............................................................................................................................. 131
            3.12 SPINNING OF THE CUBE ....................................................................................................................................... 131
              3.12.1 Updating in the Display Callback .................................................................................................................. 131

              3.12.2 Uniform Variables ......................................................................................................................................... 132
            3.13 INTERFACES TO THREE-DIMENSIONAL APPLICATIONS ........................................................................................ 133

              3.13.1 Using Areas of the Screen ............................................................................................................................. 133
              3.13.2 A Virtual Trackball ......................................................................................................................................... 134
              3.13.3 Smooth Rotations ......................................................................................................................................... 135

              3.13.4 Incremental Rotation .................................................................................................................................... 136
            3.14 QUATERNIONS ..................................................................................................................................................... 137

              3.14.1 Complex Numbers and Quaternions ............................................................................................................ 137
              3.14.2 Quaternions and Rotation ............................................................................................................................ 138

            3.15 Curve Generation and Interpolation ................................................................................................................... 139
              3.15.1 Parametric Curves ......................................................................................................................................... 140


                                                               6
   1   2   3   4   5   6   7   8   9   10   11