Transformations ITransformations and MatricesWhat is a 2D Linear Transf ?Example: Scale in xExample: Scale in x by 2Slide 6Slide 7Slide 8Slide 9Summary on ScaleMatrix RepresentationSlide 12Slide 13Matrix Representation Showing SameWhat about Rotation?Rotate byRotate by : 1st QuadrantSlide 18Rotate by : 2nd QuadrantRotate by : 2nd QuadrantRotate by : 2nd QuadrantSummary of Rotation bySummary (Column Form)Using Matrix NotationGeneral Rotation by MatrixWho had linear algebra?What do the off diagonal elements do?Off Diagonal ElementsExample 1Example 1Slide 31Example 2Slide 33Slide 34SummaryDouble ShearSample Points: unit inversesGeometric View of Shear in xAnother Geometric View of Shear in xSlide 40Geometric View of Shear in yAnother Geometric View of Shear in ySlide 43“Lazy 1”Translation in xSlide 46Homogeneous CoordinatesSlide 48Slide 49Slide 50We’ve got Affine TransformationsCompound TransformationsElementary TransformationsRefection about y-axisReflection about y-axisReflection about x-axisSlide 57Is Reflection “Elementary?”Reflection is Scale (-1)Example:Move clock handsSlide 61Slide 62Slide 63Clock TransformationsSlide 65Slide 66Map [a,b] [0,1]Slide 68Slide 69Slide 70Just Look atMap [a,b] [-1,1]Map [a,b] [-1,1]Slide 74Now Map [a,b] [c,d]Slide 76All Together: [a,b] [c,d]Now Map RectanglesTransformation in x and yThis is the Viewport Transformation3D Transformations3D Scale in xSlide 833D Scale in y3D Scale in zOverall 3D ScaleSlide 87What is a Positive Rotation in 3D ?3D Positive Rotations3D Rotation about z-axis by3D Rotation about x-axis by3D Rotation about x-axis3D Rotation about y-axis by3D Rotation about y-axisSlide 95Consider an arbitrary 3D rotationWant to rotate by about arbitrary axis aFirst rotate about byThen rotate about byNow perform rotation about -Slide 101Slide 102Slide 103We effected a rotation by about arbitrary axis aSlide 105Rotation about an arbitrary axisSlide 108Recall,It follows directly that,Slide 111Slide 1123D Translation in x3D Translation in y3D Translation in z3D Shear in x -directionSlide 1173D Shears:clamp a principal plane, shear in other 2 DoFsSlide 1193D Shear in y -directionSlide 121Slide 1223D Shear in z -direction3D Shear in zSlide 125What is “Perspective?”Many Kinds of Perspective UsedPerspective in Art“True” Perspective in 2DSlide 130Slide 131Slide 132End Transformations ITransformations ICS5600Computer GraphicsbyRich Riesenfeld27 February 2002Lecture Set 5CS56002Transformations and Matrices•Transformations are functions•Matrices are functions representations•Matrices represent linear transf’s• s'TransfLinear 2Matrices22 Dx CS56003What is a 2D Linear Transf ?Recall from Linear Algebra: . and vectorsand ascalar for ,)()()(:yxyTxaTyxaTDefinitionCS56004Example: Scale in x ),2(),2(),(2:say 2,by in x, Scale11001010yxyxyyxxCS56005Example: Scale in x by 2What is the graphical view?CS56006),00(yx),002(yx),11(yx),112(yxScale in x by 2yxCS56007xy),002(yx),112(yx yyxx1010,22 yyxx1010,22 CS56008y),00(yx),11(yx yyxx1010),(2 yyxx1010),( yyxx1010),(2 xCS56009y yyxx1010),(2 yyxx1010),( yyxx1010),(2 yxCS560010Summary on Scale•“Scale then add,” is same as•“Add then scale”CS560011Matrix Representationyxyx 21002Scale in x by 2:CS560012Matrix Representationyxyx22001Scale in y by 2:CS560013Matrix Representationyxyxyx2222002Overall Scale by 2:CS560014Matrix RepresentationShowing Same)(22)()(21002101010101010yyxxyyxxyyxxCS560015What about Rotation?Is it linear?CS560016Rotate by xy)0,1()1,0(CS560017sinRotate by : 1st Quadrantxy)0,1()sin,(coscosCS560018Rotate by : 1st Quadrant)sin,(cos)0,1(CS560019Rotate by : 2nd Quadrant xy)1,0()0,1(CS560020Rotate by : 2nd Quadrant xycos sin )1,0(CS560021Rotate by : 2nd Quadrant)cos,sin()1,0(CS560022Summary of Rotation by )sin,(cos)0,1()cos,sin()1,0(CS560023Summary (Column Form)cossin10sincos01CS560024Using Matrix Notationsincos01cossinsin-coscossin-10cossinsin-cos(Note that unit vectors simply copy columns)CS560025General Rotation by Matrixcossinysin-coscossinsin-cosyxxyxCS560026Who had linear algebra? Who understand matrices?CS560027What do the off diagonal elements do?CS560028Off Diagonal Elementsybxxyxb 101yayxyxa101CS560029Example 1yyxxyxyxT4.014.001),()1,0()0,1()1,1()0,0(SxCS560030Example 1 xyyxxyxT4.0 ),(S)1,0()0,1()1,1()0,0(CS560031Example 1y)1,0()4.0,1()0,0(T(S)yxxyxT4.0 ),()4.1,1(xCS560032Example 2yyyxyxyxT6.0106.01),(Sx)1,0()0,1()1,1()0,0(CS560033Example 2xyyyxyxT6.0 ),(S)1,0()0,1()1,1()0,0(CS560034Example 2xy)1,0()0,1()0,0(T(S))1,6.0(yyxyxT6.0 ),()1,6.1(CS560035SummaryShear in x:Shear in y:yayxyxaShx101ybxxyxbShy101CS560036Double Shearab)(10110111baab11ab)(101101babaCS560037Sample Points: unit inverses011101bb101011aaCS560038Geometric View of Shear in x)0,1()1,( a)1,0()0,1()1,1(Another Geometric View of
View Full Document