1 / 27

ORIENTATION

ORIENTATION. Interpolating rotations is difficult. Use Quaternions. Object Representation. Define object in world space Object space data Scale Rotation Translation. Desired operations Interpolation between transformations Concatenation of one transformation after another.

wilma
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 difficult Use Quaternions

  2. Object Representation • Define object in world space • Object space data • Scale • Rotation • Translation Desired operations Interpolation between transformations Concatenation of one transformation after another Handle scale, rotation, translation, independently Rotation deserves special attention!

  3. Repeated Rotations: Error Management Task: Rotate an object some Dq every frame Issue: Avoiding accumulated roundoff error

  4. <= repeat <= repeat <= repeat Repeated Rotations: Error Management Method 1 M = create_rotation_matrix(Dq) Object = apply M to Object Method 2 D = create_rotation_matrix(Dq) M create_rotation_matrix(q) M = D M Object = apply M to object Method 3 q = q + Dq M = create_rotation_matrix(q) Object = apply M to object

  5. Orientation Representation orientation

  6. O1 O 1.5 O2 Interpolation

  7. O1 O2 Concatenation

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

  9. c a b 0 d e f 0 g h i 0 0 0 0 1 Rotation Matrices 9 values but 3 degrees of freedom Euler’s rotation theorem: An arbitrary rotation may be described by only three parameters.

  10. 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 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 ?? Rotation Matrices Can’t interpolate rotation matrices -90o z-axis 90o z-axis

  11. Y X Z Fixed Angles 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-x. But x-x-z is not. E.g., (qz, qy, qx) Q = Rx(qx). Ry(qy). Rz(qz). P

  12. Y Y Z Z X X Fixed Angles Using order z-y-x Orientation represented by (0,90,0) Original orientation Note: left-hand coordinate system

  13. Y Z X Fixed Angles Using order z-y-x Y Z X (45,90,0) Original

  14. Y Z X Gimbal Lock Using order z-y-x From (0,90,0), how can the object change its orientation? What do these do? a) (e,90,0) b) (0,90+e,0) c) (0,90,e)

  15. Y Y Is same as X-axis rotation Z Z X X (0,90,0) (0,90,45) Fixed Angles (0,90,0) (-45,90,0) Changing Z-axis parameter

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

  17. Y y Z z x X Euler Angles Ordered triple of rotations about local axes, As with fixed angles, any triple can be used that doesn’t immediately repeat an axis, e.g., x-y-z, is fine, so is x-y-x. But x-x-z is not.

  18. Y y Z z x X Euler Angles Use (z,y,x) Show that Euler angle ordering is equivalent to reverse ordering in fixed angles …and so has the same problems

  19. Axis-Angle Rotate object by q around A (Ax,Ay,Az,q) A q Y Z X Euler’s rotation theorem: An arbitrary rotation may be described by only three parameters. ?

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

  21. Quaternions Has the same information as axis-angle but in a more computational-friendly form q =[s,v] =[s,x,y,z] A q (cos(q/2),sin(q/2)*A)

  22. Quaternions Basic math operations

  23. Quaternions - rotate a point v = (x,y,z) => [0,v]

  24. Composite transformations Rotation by p then by q is the same as rotation by qp (where qp is quaternion q multiplied by quaternion p)

  25. Quaternion Rotation q Unit quaternion => ||q||

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

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