This unit is about the math for these transformations. Represent transformations using matrices and matrix-vector multiplications. General Idea: Object in model coordinates, transform into world coordinates, represent points on object as vectors, multiply by matrices, demos with applet. | Transformations Goals This unit is about the math for these transformations Represent transformations using matrices and matrix-vector multiplications. General Idea Object in model coordinates Transform into world coordinates Represent points on object as vectors Multiply by matrices Demos with applet 2D transformations (Nonuniform) Scale Shear Rotations 2D simple, 3D complicated. [Derivation? Examples?] 2D? Linear Commutative R(X+Y) = R(X)+R(Y) Composing Transforms Often want to combine transforms . first scale by 2, then rotate by 45 degrees Advantage of matrix formulation: All still a matrix Not commutative!! Order matters X2 = SX1 X3 = RX2 X3 = R(SX1) = (RS)X1 X3 (SR)X1 Inverting Composite Transforms Say I want to invert a combination of 3 transforms Option 1: Find composite matrix, invert Option 2: Invert each transform and swap order Obvious from properties of matrices 3D rotations Rotations Review of 2D case Orthogonal? RT R = I Rotations in 3D Rotations about coordinate | Transformations Goals This unit is about the math for these transformations Represent transformations using matrices and matrix-vector multiplications. General Idea Object in model coordinates Transform into world coordinates Represent points on object as vectors Multiply by matrices Demos with applet 2D transformations (Nonuniform) Scale Shear Rotations 2D simple, 3D complicated. [Derivation? Examples?] 2D? Linear Commutative R(X+Y) = R(X)+R(Y) Composing Transforms Often want to combine transforms . first scale by 2, then rotate by 45 degrees Advantage of matrix formulation: All still a matrix Not commutative!! Order matters X2 = SX1 X3 = RX2 X3 = R(SX1) = (RS)X1 X3 (SR)X1 Inverting Composite Transforms Say I want to invert a combination of 3 transforms Option 1: Find composite matrix, invert Option 2: Invert each transform and swap order Obvious from properties of matrices 3D rotations Rotations Review of 2D case Orthogonal? RT R = I Rotations in 3D Rotations about coordinate axes simple Always linear, orthogonal Rows/cols orthonormal: RT R = I R(X+Y)=R(X)+R(Y) Geometric Interpretation 3D Rotations Rows of matrix are 3 unit vectors of new coord frame Can construct rotation matrix from 3 orthonormal vectors Geometric Interpretation 3D Rotations Rows of matrix are 3 unit vectors of new coord frame Can construct rotation matrix from 3 orthonormal vectors Effectively, projections of point into new coord frame New coord frame uvw taken to cartesian components xyz Inverse or transpose takes xyz cartesian to uvw Non-Commutativity Not Commutative (unlike in 2D)!! Rotate by x, then y is not same as y then x Order of applying rotations does matter Follows from matrix multiplication not commutative R1 * R2 is not the same as R2 * R1 Demo: HW1, order of right or up will matter Arbitrary rotation formula Rotate by an angle θ about arbitrary axis a Homework 1: must rotate eye, up direction Somewhat mathematical derivation but useful formula Problem setup: Rotate vector