330 likes | 667 Views
Consists of two parts 3D rotation 3D translation The same as 2D. 3D rotation is more complicated than 2D rotation (restricted to z-axis) Next, we will focus on the spatial (3D) rotation. 2D (rigid body) kinematics C.M. translation and rotation. 3D Kinematics. Euler angles Axis-angle
E N D
Consists of two parts 3D rotation 3D translation The same as 2D 3D rotation is more complicated than 2D rotation (restricted to z-axis) Next, we will focus on the spatial (3D) rotation 2D (rigid body) kinematics C.M. translation and rotation 3D Kinematics
Euler angles Axis-angle 3X3 rotation matrix Unit quaternion Learning Objectives Representation (uniqueness) Perform rotation Composition Interpolation Conversion among representations … 3D Rotation Representations
Euler Angles • Specify orientation in rotation along 3 axes • Variation: which axes? global or local?
From Mason’s book a g b Write a program …
Roll, pitch, yaw Gimbal lock: reduced DOF due to overlapping axes Why gimbal lock a problem? Euler Angles Ref: http://www.fho-emden.de/~hoffmann/gimbal09082002.pdf
Axis-Angle Representation • Rot(n,q) • n: rotation axis (global) • q: rotation angle (rad. or deg.) • follow right-handed rule • Rot(n,q)=Rot (-n,-q) • Problem with null rotation: rot(n,0), any n • Perform rotation • Rodrigues formula • Interpolation/Composition: poor • Rot(n2,q2)Rot(n1,q1) =?= Rot(n3,q3)
a Rodrigues Formula r v v’=R v v’ References: http://mesh.caltech.edu/ee148/notes/rotations.pdf http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/as5/rotation.html
Meaning of three columns Perform rotation: linear algebra Composition: trivial orthogonalization might be required due to FP errors Interpolation: ? Rotation Matrix
Gram-Schmidt Orthogonalization • If 3x3 rotation matrix no longer orthonormal, metric properties might change! Verify!
i k j Quaternion • A mathematical entity invented by Hamilton • Definition
Operators Addition Multiplication Conjugate Length Quaternion (cont)
Unit Quaternion • Define unit quaternion as follows to represent rotation • Example • Rot(z,90°) • q and –q represent the same rotation Why “unit”? DOF point of view!
quaternion→axis-angle Use both values of sine and cosine to determine the angle!!
y x z Example x y z Rot (90, 0,0,1) OR Rot (-90,0,0,-1)
Unit Quaternion (cont) • Perform Rotation • Composition • Interpolation • Linear • Spherical linear
y,x’ x y’ z,z’ Example p(2,1,1) Rot(z,90°)
y,x’ x y’ z,z’ Example y x,x’ z,y’ z’
Matrix Conversion (cont) Find largest qi2; solve the rest
q r Slerp (Spherical Linear Interpolation) unit sphere in R4 The computed rotation quaternion rotates about a fixed axis at constant speed References: http://www.gamedev.net/reference/articles/article1095.asp http://www.diku.dk/research-groups/image/teaching/Studentprojects/Quaternion/ http://www.sjbrown.co.uk/quaternions.html http://www.theory.org/software/qfa/writeup/node12.html
Spatial Displacement • Any displacement can be decomposed into a rotation followed by a translation • Matrix • Quaternion
From Mason’s book a g b Write a program …
z a z’’’ g y’’’ x y b x’’’
In v’=Mv convention From Lee and Koh (1995) Euler angles in ASF