1 / 26

ORIENTATION

Learn how to handle rotations, translations, and scaling independently using quaternion representation in object orientation. See methods for error management and transformation matrices in Euler Angles and axis-angle orientations.

woodene
Download Presentation

ORIENTATION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ORIENTATION Interpolating rotations is difficullt Use Quaternions

  2. Object Representation • Define object in world space • Object space data • Translation • Rotation • Scale Desired operations Interpolation Concatenation Handle rotation, translation, scale independently

  3. <= repeat <= repeat <= repeat Error Management Method 1 M = rotate(Dq) Object = apply M to Object Method 2 D = rotate(Dq) M = rotate(q) M = D.M Object = apply M to object Method 3 q = q + Dq M = rotate(q) Object = apply M to object

  4. Orientation Representation orientation

  5. O1 O 1.5 O2 Interpolation

  6. O1 O2 Concatenation

  7. Orientation Representation Rotation Matrix Fixed Angles Euler Angles Axis-Angle Quaternion

  8. c a b 0 d e f 0 g h i 0 0 0 0 1 Transformation Matrices

  9. 0 -1 0 0 0 0 1 0 1 0 0 0 -1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 1 Transformation Matrices 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1

  10. Y X Z Fixed Angles E.g., (Z,Y,X) Rx(q1). Ry(q2). Rz(q3). P

  11. Fixed Angles E.g., (0,90,0) Y Y Z Z X X

  12. Fixed Angles E.g., (-45,90,0) Y Y Z Z X X

  13. Gimbal Lock What do these do? E.g., (0,90,0) (e,90,0) Y (0,90+e,0) Z (0,90,e) X

  14. Fixed Angles E.g., (-45,90,0) E.g., (0,90,0) Y Y Z-axis rotation Z X X Z

  15. Fixed Angle Interpolation (0,90,0) to (90,0,90) (0,0,0) (0,90,0) (90,0,90)

  16. Euler Angles use ordered triple of rotations about global axes, Any triple can be used that doesn’t immediately Repeat an axis e.g., (x,y,z) is fine, so is (x,y,z); (x,x,z) is not Y y Z z x X

  17. Y y Z z x X Euler Angles (z,y,x) Rz(q1).P Rz(q1).Ry(q2). Rz(-q1).P’ Rz(q1). Ry(q2). Rz(-q1). Rz(q1).P Rz(q1). Ry(q2). P Rz(q1). Ry(q2). Rx(q3). Ry(- q2). Rz(-q1).P’’ Rz(q1). Ry(q2). Rx(q3). Ry(- q2). Rz(-q1). Rz(q1). Ry(q2). P Rz(q1). Ry(q2). Rx(q3). P

  18. Axis-Angle Rotate object by q around A (Ax,Ay,Az,q) A q Y Z X Euler’s rotation theorem

  19. Axis-Angle Interpolation 1. Interpolate axis from A1 to A2 Rotate axis about A1 x A2 to get A A1 q1 A Y q A2 A1 x A2 2. Interpolate angle from q1 to q2 to get q q2 Z X 3. Rotate object by q around A

  20. Quaternions q =[s,v] =[s,x,y,z] A q (cos(q/2),sin(q/2)*A)

  21. Quaternions [s1,v1] + [s2,v2] = [s1+s2,v1+v2] [s1,v1] * [s2,v2] = [s1*s2-v1.v2,s1*v2+s2*v1+v1Xv2] ||q|| = sqrt(s*s + x*x + y*y + z*z) q * [1,0,0,0] = q q-1 = [-s,v]/||q||2 q * q-1 = [1,0,0,0]

  22. Quaternions - rotate a point v = (x,y,z) => [0,v] Rotq(v) = v’ = q * [0,v] * q-1

  23. Composite transformations Rotq(Rotp(v)) = Rotq( p * [0,v] * p-1 ) = q p * [0,v] * p-1 q -1 = q p * [0,v] * (qp) -1 = Rotqp(v))

  24. Quaternion Rotation q Unit quaternion => ||q|| Rot [s,v ]= Rot k*[s, v]= Rot [k*s, k*v] Rot [s,v ] == Rot [-s, -v]

  25. Quaternion Interpolation Fixed angles (90,0,90) (0,90,0) quaternions [0.5,0.5,0.5,0.5] [0.7,0.0,0.7,0.0]

  26. Quaternion Interpolation Linearly interpolating fixed angles from (0,90,0) to (90,0,90) Interpolating quaternions from (0.5,0.0,1.0,0.0) to (0.5,0.5,0.5,0.5) using sphereical linear interpolation

More Related