Download presentation
Presentation is loading. Please wait.
Published byGriffin Thompson Modified over 9 years ago
1
3D Game Engine Design 1 3D Game Engine Design Ch. 2.3. 3D MAP LAB
2
3D Game Engine Design 2 Quaternion Quaternion Algebra Def > A Quaternion is defined by q = w + xi + yj + zk where w, x, y, z are in R and Def> Let then
3
3D Game Engine Design 3 Quaternion(cont’d)
4
3D Game Engine Design 4 Quaternion(cont’d) Thm> Let then and let then quaternion multiplication can be defined using vector dot product and cross product Thm> A quaternion q may be also viewed as a 4D vector( w, x, y, z).then the dot product of two quaternion is
5
3D Game Engine Design 5 Quaternion(cont’d) Def> A unit quaternion is a quaternion q for which Thm> The inverse of unit quaternion and the product of unit quaternion are themselves unit quaternion. Unit quaternion can be represented by
6
3D Game Engine Design 6 Quaternion(cont’d) has length 1. However observe that the quaternion product similar to unit-length complex numbers Euler’s identity for complex numbers generalizes to quaternion. Thm> The power of unit quaternion The logarithm of unit quaternion
7
3D Game Engine Design 7 Quaternion(cont’d) Caution : standard identities are not allowed because of non-commutative of quaternion. That is,
8
3D Game Engine Design 8 Quaternion(cont’d) Relationship to quaternion to rotation Thm> Unit quaternion represents the rotation of the 3D vector by an angle about the 3D axis. And rotated vector is represented by. Proof> it is enough to show that R(v) is 3D vector R(v) is length preserving function. R(v) is linear transformation. R(v) doesn’t have reflection component. Rotation axis is really u. ( 1) Rotation angle (2) We will prove (1),(2)
9
3D Game Engine Design 9 Quaternion(cont’d) (1) (2) u v w
10
3D Game Engine Design 10 Quaternion(cont’d)
11
3D Game Engine Design 11 Quaternion(cont’d) Conversion between various rotation representations Angle-axis rotation Quaternion rotationRotation matrix
12
3D Game Engine Design 12 Quaternion(cont’d) Conversion between angle-axis and rotation matrix Thm> angle-axis to rotation matrix
13
3D Game Engine Design 13 Quaternion(cont’d) Thm> Rotation matrix to angle-axis =0 or 180(??)
14
3D Game Engine Design 14 Quaternion(cont’d) Conversion between quaternion and angle-axis Thm> angle-axis to quaternion Thm> quaternion to angle-axis
15
3D Game Engine Design 15 Quaternion(cont’d) Conversion between quaternion and rotation matrix Thm> quaternion to rotation matrix Thm> rotation matrix to quaternion
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.