Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review: 3D Transforms Continued

Similar presentations


Presentation on theme: "Review: 3D Transforms Continued"— Presentation transcript:

1 Review: 3D Transforms Continued
Rotation about an arbitrary axis Quaternions

2 3D rotations about an x,y, or z axis are trivial extensions of 2D rotations about the origin
For example, consider a rotation of 90 degrees about the x-axis. The y and z coordinates change but the x coordinate is not affected. A 3D rotation about one of the major axes occurs in a 2D plane defined by the point’s coordinate relative to that axis (x = 0 plane in this case). (0,d,0) Z (0,0,d) X ©Babu 2009 5/14/2018

3 3D Rotation about the x axis
By looking at the 2D rotation matrix we can write down what the 3D rotation matrix about the x axis must look like: 5/14/2018 ©Babu 2009

4 Translations are defined relative to the x,y, and z axes
Notation: P’ = Tx(5)P Implementation Meaning: Move the position of point P five units in a positive direction with respect to the x axis New point is (x+5, y, z) ©Babu 2009 5/14/2018

5 Rotation about the x axis
Notation P’ = Rx(30)P Implementation (Homogenous Coordinates) Meaning Rotate a point P a positive degrees about the x-axis ©Babu 2009 5/14/2018

6 Rotation about the y axis
Notation P’ = Ry(30)P Implementation (Homogenous Coordinates) Meaning Rotate a point P a positive degrees about the y-axis z x y ©Babu 2009 5/14/2018

7 Rotation about the z axis
Notation P’ = Rz(30)P Implementation (Homogenous Coordinates) Meaning Rotate a point P a positive degrees about the z-axis ©Babu 2009 5/14/2018

8 Rotation About An Arbitrary Axis
p2 u Z θ p1 Y 5/14/2018 ©S. Babu X

9 Rotation About An Arbitrary Axis
Translate p1 to origin p2 T(-p1) u Z p1 u' Y 5/14/2018 ©S. Babu X

10 Rotation About An Arbitrary Axis
Rotate u' to u'' in YZ plane (rotation about Y axis, Ry(-β)) Ry(-β)) ∙ T(-p1) Z u' uz c Y a ß uy b ux 5/14/2018 ©Z. Wartell, S. Babu, L. F. Hodges X

11 Rotation About An Arbitrary Axis
Rotate u' to u'' in YZ plane (rotation about Y axis, Ry(-β)) Ry(-β)) ∙ T(-p1) Z u'' u' uz c Y a ß uy b ux 5/14/2018 ©Z. Wartell, S. Babu, L. F. Hodges X

12 Rotation About An Arbitrary Axis
After Ry(-ß), angle α and u'' lies in the y-z plane. Next, Rotate u'' to Z axis (u''') (rotation about X axis, Rx(α)) Rx(α) ∙ Ry(-β) ∙ T(-p1) u'' Z a c uz Y α uy ux 5/14/2018 ©S. Babu X

13 Rotation About An Arbitrary Axis
After Rx(α), u'' lies in the Z axis as u'''. Next, rotate about Z by θ (Rz(θ)) Rz(θ) ∙ Rx(α) ∙ Ry(-β) ∙ T(-p1) u''' Z u'' Y θ 5/14/2018 ©Z. Wartell, S. Babu, L. F. Hodges X

14 Rotation About An Arbitrary Axis
Now we’ve rotated about U. Next, apply the inverse transformations to place u''' back on u p2 R((p1,p2),θ) = T(p1) ∙ Ry(β) ∙ Rx(-α) ∙ Rz(θ) ∙ Rx(α) ∙ Ry(-β) ∙ T(-p1) u Z θ p1 Y 5/14/2018 ©Z. Wartell, S. Babu, L. F. Hodges X

15 Rotation About An Arbitrary Axis
5/14/2018 ©Z. Wartell, S. Babu

16 Quaternions Alternative rotation representation: 4 real numbers
interpolation between quaternions well defined (“slerp”) no gimbal lock composition of quaternions: 16 *’s, 9+’s (matrix 27 *’s and 18 +’s) 5/14/2018 ©Z. Wartell, S. Babu

17 Quaternions Rotation representation:
Relation to axis-angle representation (u,θ) is: y u θ x Z 5/14/2018 ©S. Babu

18 Quaternion Rotation: Basic Idea
To rotate point p: represent p as quaternion: compute rotated quaternion point representation extract standard coordinate representation p' from qp' y u p' p x Z 5/14/2018 ©S. Babu

19 Details of Rotation How do you multiply quaternions:
How do you find inverse of quaternion: For rotations we assume unit quaternions, hence: 5/14/2018 ©S. Babu

20 Quaternion Rotation: Complete Equation
To rotate point p: y u p' p x Z 5/14/2018 ©S. Babu

21 How do quaternions help?
Quaternion composition: requires 16 *’s, 12+’s while 3x3 matrix composition needs 27*’s and 18+’s No gimbal lock interpolation between two orientations using “spherical linear interpolation” (slerp) of their quaternions: -constant angular velocity -unique interpolation -interpolation that is same regardless of coordinate system used for computation 5/14/2018 ©Z. Wartell, S. Babu


Download ppt "Review: 3D Transforms Continued"

Similar presentations


Ads by Google