Lecture 6: Normal Transformations, 3D Transformations, Euler Angles COMPSCI/MATH 290-04 Chris Tralie, Duke University 2/2/2016 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Announcements ◮ Mini Assignment 2 Out, Due Next Monday 11:55 PM ◮ Online notes coming soon... (for now slides) COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Table of Contents ◮ Linear Functions Continued ⊲ Normal Transformations ⊲ Linear Equations ⊲ 3D Transformations / Euler Angles COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Column Vector Walking Interpretation 0 0 . . . . . | | | | . . . . � � � � = a k � v 1 v 2 . . . v k . . . v N v k a k . . . . . | | . | . | . . 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Column Vector Walking Interpretation a 1 . . | | | . N a 2 � � � � a i � v 1 v 2 . . . v N = v i . . . . . i = 1 | | . | a N Linear combination of column vectors! COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Column Vector Walking Interpretation � − 1 � � u � − 1 � 1 � � � 1 = u + v 0 1 v 0 1 Y v(1, 1) X u(-1, 0) COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Linear Function To Matrix Proof ⊲ Define a linear function L : x ∈ R N → y ∈ R M COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Linear Function To Matrix Proof ⊲ Define a linear function L : x ∈ R N → y ∈ R M �� 1 � � k = j ⊲ Let L j = L , k = 1 to N 0 otherwise COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Linear Function To Matrix Proof ⊲ Define a linear function L : x ∈ R N → y ∈ R M �� 1 � � k = j ⊲ Let L j = L , k = 1 to N 0 otherwise a 1 . . | | . | N a 2 � a i L i L 1 L 2 L N . . . = . . . . . i = 1 | | . | a N COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Linear Function To Matrix Proof ⊲ Define a linear function L : x ∈ R N → y ∈ R M �� 1 � � k = j ⊲ Let L j = L , k = 1 to N 0 otherwise a 1 . . | | . | N a 2 � a i L i L 1 L 2 L N . . . = . . . . . i = 1 | | . | a N ⊲ Recall that for a linear function: L ( ax + by ) = aL ( x ) + bL ( y ) COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Linear Function To Matrix Example f ( x , y , z ) = ( x + y + 2 z , 3 x − 2 y ) f ( 1 , 0 , 0 ) = f ( 0 , 1 , 0 ) = f ( 0 , 0 , 1 ) = COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Square Matrix Inverse A − 1 A = I AA − 1 = I COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Square Matrix Inverse A − 1 A = I AA − 1 = I Example: � 2 � 0 . 5 � � 0 0 , A − 1 = A = 0 1 0 1 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Square Matrix Inverse A − 1 A = I AA − 1 = I Example: � − 1 � − 1 � � 0 0 , A − 1 = A = 0 1 0 1 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Square Matrix Product Inverse ( AB ) − 1 = B − 1 A − 1 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Matrix Transpose A T ij = A ji ⇒ A T : N × M A : M × N ⇐ COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Matrix Transpose A T ij = A ji ⇒ A T : N × M A : M × N ⇐ . . . . | | . | . | A = v 1 � v 2 � v k � v N � . . . . . . . . . . | | . | . | COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Matrix Transpose A T ij = A ji ⇒ A T : N × M A : M × N ⇐ . . . . | | . | . | A = v 1 � v 2 � v k � v N � . . . . . . . . . . | | . | . | − v 1 � − � − v 2 − A T = . . . . . . . . . � v N − − COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Matrix Transpose Example 1 2 − 2 3 A = 0 4 5 − 1 6 − 4 3 2 1 0 6 2 4 − 4 A T = − 2 5 3 3 − 1 2 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Transpose of Product Matrix ( AB ) T = B T A T Check dimensions! COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Rotation Matrices Inverse � cos ( θ ) � − sin ( θ ) R θ = sin ( θ ) cos ( θ ) COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Rotation Matrices Inverse � cos ( θ ) � − sin ( θ ) R θ = sin ( θ ) cos ( θ ) � cos ( θ ) � sin ( θ ) R − 1 = R − θ = θ − sin ( θ ) cos ( θ ) COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Rotation Matrices Inverse � cos ( θ ) � − sin ( θ ) R θ = sin ( θ ) cos ( θ ) � cos ( θ ) � sin ( θ ) R − 1 = R − θ = θ − sin ( θ ) cos ( θ ) R − 1 = R T θ θ COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Table of Contents ⊲ Linear Functions Continued ◮ Normal Transformations ⊲ Linear Equations ⊲ 3D Transformations / Euler Angles COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformations � cos ( θ ) � � x � x cos ( θ ) − y sin ( θ ) − sin ( θ ) � � = sin ( θ ) cos ( θ ) y x sin ( θ ) + y cos ( θ ) Before After COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformations � 2 � � x � 2 x � � 0 = 0 1 y y Before After COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformations Uh oh.... � 2 � � x � 2 x � � 0 = 0 1 y y Before After COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected P1 P2 Tangent Vector: � T = � P 2 − � P 1 Normal Vector: � N Treating as column vectors: T T N = 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected Given Transformation matrix A , transformed tangent vector is AP 2 − AP 1 = A ( P 2 − P 1 ) = AT COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected Given Transformation matrix A , transformed tangent vector is AP 2 − AP 1 = A ( P 2 − P 1 ) = AT Want to find a matrix G s.t. transformed normal GN is orthogonal to AT ( AT ) T ( GN ) = 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected ( AT ) T ( GN ) = 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected ( AT ) T ( GN ) = 0 T T A T GN = 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected ( AT ) T ( GN ) = 0 T T A T GN = 0 T T ( A T G ) N = 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected ( AT ) T ( GN ) = 0 T T A T GN = 0 T T ( A T G ) N = 0 We know T T N = 0, so A T G = I Therefore, G = ( A T ) − 1 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformation Corrected � 2 � 0 . 5 0 � 0 � , G = ( A T ) − 1 = A − 1 = A = 0 1 0 1 Before After COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformations Corrected � cos ( θ ) − sin ( θ ) � , G = ( A T ) − 1 = ( A − 1 ) − 1 = A A = sin ( θ ) cos ( θ ) Before After COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Normal Transformations Corrected � 3 2 � � � 1 0 , G = ( A T ) − 1 = 2 3 A = − 2 0 1 1 3 Before After COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Table of Contents ⊲ Linear Functions Continued ⊲ Normal Transformations ◮ Linear Equations ⊲ 3D Transformations / Euler Angles COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles
Recommend
More recommend