lecture 6 normal transformations 3d transformations euler
play

Lecture 6: Normal Transformations, 3D Transformations, Euler Angles - PowerPoint PPT Presentation

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


  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. Square Matrix Inverse A − 1 A = I AA − 1 = I COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles

  13. 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

  14. 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

  15. Square Matrix Product Inverse ( AB ) − 1 = B − 1 A − 1 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles

  16. 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

  17. 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

  18. 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

  19. 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

  20. Transpose of Product Matrix ( AB ) T = B T A T Check dimensions! COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles

  21. Rotation Matrices Inverse � cos ( θ ) � − sin ( θ ) R θ = sin ( θ ) cos ( θ ) COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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

  27. 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

  28. 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

  29. 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

  30. 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

  31. Normal Transformation Corrected ( AT ) T ( GN ) = 0 COMPSCI/MATH 290-04 Lecture 6: Normal Transformations, 3D Transformations, Euler Angles

  32. 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

  33. 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

  34. 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

  35. 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

  36. 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

  37. 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

  38. 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