1 / 30

Rotations and Translations

Rotations and Translations. Euler Theorem + Quaternions . Representing a Point 3D. A three-dimensional point A is a reference coordinate system here. Rotation along the Z axis. In general:. Using Rotation Matrices. Combining Rotation and Translation. Extension to 4x4.

kay
Download Presentation

Rotations and Translations

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. Rotations and Translations Euler Theorem + Quaternions

  2. Representing a Point 3D • A three-dimensional point A is a reference coordinate system here

  3. Rotation along the Z axis • In general:

  4. Using Rotation Matrices

  5. Combining Rotation and Translation

  6. Extension to 4x4 • We can define a 4x4 matrix operator and use a 4x1 position vector

  7. Formula

  8. Notes • Homogeneous transforms are useful in writing compact equations; a computer program would not use them because of the time wasted multiplying ones and zeros. This representation is mainly for our convenience. • For the details turn to chapter 2.

  9. Euler’s Theorem • Any two independent orthonormal coordinate frames can be related by a sequence of rotations (not more than three) about coordinate axes, where no two successive rotations may be about the same axis.

  10. Euler Angles • This means, that we can represent an orientation with 3 numbers • Assuming we limit ourselves to 3 rotations without successive rotations about the same axis:

  11. Example

  12. Another Example • Suppose we want to use ZXZ rotation, • Rotation along Z axis, • Rotation along X axis, • Rotation along Z axis,

  13. Example - Cont • Let’s see what happens if,

  14. Example – Cont 2 • Changing 's and 's values in the above matrix has the same effects: the rotation's angle changes, but the rotation's axis remains in the direction

  15. Gimbal Lock • Gimbal Lock Animation

  16. Euler Angle - Matlab • If we want to rotate Roll,Pitchand Yaw • Roll 0.1 degrees • Pitch 0.2 degrees • Yaw 0.3 degrees >> rotx(0.1)*roty(0.2)*rotz(0.3) ans = 0.9363 -0.2896 0.1987 0.3130 0.9447 -0.0978 -0.1593 0.1538 0.9752

  17. Euler Angle – Matlab cont. >> rpy2r(0.1,0.2,0.3) ans = 0.9363 -0.2896 0.1987 0.3130 0.9447 -0.0978 -0.1593 0.1538 0.9752

  18. Euler Theorem • In three-dimensional space, any displacement of a rigid body such that a point on the rigid body remains fixed, is equivalent to a single rotation about some axis that runs through the fixed point.

  19. Euler Theorem - Matlab R = 0.9363 -0.2896 0.1987 0.3130 0.9447 -0.0978 -0.1593 0.1538 0.9752 [theta, v] = tr2angvec(R) theta = 0.3816 v = 0.3379 0.4807 0.8092

  20. Euler Theorem – Matlab cont. >> angvec2r(0.3816, [0.3379,0.4807,0.8092]) ans = 0.9363 -0.2897 0.1987 0.3130 0.9447 -0.0979 -0.1593 0.1538 0.9752

  21. 3D Rotations - Matlab R = rotx(pi/2); trplot(R) tranimate(R)

  22. HW

  23. Quaternions • The quaternion group has 8 members: • Their product is defined by the equation:

  24. Example • Calculate

  25. Quaternions - Algebra • Using the same methods, we can get to the following:

  26. Quaternions Algebra We will call the following linear combination a quaternion. It can be written also as: All the combinations of Q where a,b,c,s are real numbers is called the quaternion algebra.

  27. Quaternion Algebra By Euler’s theorem every rotation can be represented as a rotation around some axis with angle . In quaternion terms: Composition of rotations is equivalent to quaternion multiplication.

  28. Example We want to represent a rotation around x-axis by 90 , and then around z-axis by 90 :

  29. Rotating with quaternions We can describe a rotation of a given vector v around a unit vector u by angle : this action is called conjugation. * Pay attention to the inverse of q (like in complex numbers) !

  30. Rotating with quaternions • The rotation matrix corresponding to a rotation by the unit quaternion z = a + bi + cj + dk (with |z| = 1) is given by: Its also possible to calculate the quaternion from rotation matrix: Look at Craig (chapter 2 p.50 )

More Related