Sie sind auf Seite 1von 14

CS4620/5620: Lecture 5 3D Transforms (Rotations)

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala

Announcements
HW 1 out on weekend PA 1 out next Monday No recitation today

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala

Rotation about z axis

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala

Rotation about x axis

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala

Rotation about y axis

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala

General Rotation Matrices


A rotation in 2D is around a point A rotation in 3D is around an axis
so 3D rotation is w.r.t a line, not just a point there are many more 3D rotations than 2D a 3D space around a given point, not just 1D

2D
Cornell CS4620/5620 Fall 2012 Lecture 5

3D
(with previous instructors James/Marschner)

2012 Kavita Bala

Properties of Rotation Matrices


Columns of R are mutually orthonormal: RRT=RTR=I Right-handed coordinate systems: det(R)=1

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala

Specifying rotations
In 3D, specifying a rotation is more complex
basic rotation about origin: unit vector (axis) and angle convention: positive rotation is CCW when vector is pointing at you

Many ways to specify rotation


Indirectly through frame transformations Directly through Euler angles: 3 angles about 3 axes (Axis, angle) rotation Quaternions
Cornell CS4620/5620 Fall 2011 Lecture 9 2011 Kavita Bala 8

Coming up with the matrix


Showed matrices for coordinate axis rotations
but we want rotation about some random axis

Can compute by composing elementary transforms


transform rotation axis to align with x axis apply rotation inverse transform back into position

Just as in 2D this can be interpreted as a similarity transform


Cornell CS4620/5620 Fall 2012 Lecture 5 2012 Kavita Bala 9

(with previous instructors James/Marschner)

Building general rotations


Using elementary transforms you need three
translate axis to pass through origin rotate about y to get into x-y plane rotate about z to align with x axis

Alternative: construct frame and change coordinates


choose p, u, v, w to be orthonormal frame with p and u matching the rotation axis apply similarity transform T = F Rx( ) F1

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 10

Building general rotations


Alternative: construct frame and change coordinates
choose p, u, v, w to be orthonormal frame with p and u matching the rotation axis apply similarity transform T = F Rx( ) F1 interpretation: move to x axis, rotate, move back interpretation: rewrite u-axis rotation in new coordinates (each is equally valid)

(note above is linear transform; add afne coordinate)


Cornell CS4620/5620 Fall 2012 Lecture 5
(with previous instructors James/Marschner)

2012 Kavita Bala 11

Building general rotations


Alternative: construct frame and change coordinates
choose p, u, v, w to be orthonormal frame with p and u matching the rotation axis apply similarity transform T = F Rx( ) F1 interpretation: move to x axis, rotate, move back interpretation: rewrite u-axis rotation in new coordinates (each is equally valid)

Or just derive the formula once, and reuse it (more later)

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 12

Derivation of General Rotation Matrix


General 3x3 3D rotation matrix General 4x4 rotation about an arbitrary point

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 13

3D rotations
An object can be oriented arbitrarily Euler angles: stack up three coord axis rotations
ZYX case: Rz(thetaz)*Ry(thetay)*Rx(thetax) heading, attitude, bank (NASA standard airplane coordinates) pitch, yaw, roll

Cornell CS4620/5620 Fall 2011 Lecture 9

2011 Kavita Bala 14

What are the 3 angles?

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 15

Roll, yaw, Pitch

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 16

3D rotations
NASA standard Euler angles: stack up three coord axis rotations
ZYX case: Rz(thetaz)*Ry(thetay)*Rx(thetax)

Cornell CS4620/5620 Fall 2011 Lecture 9

2011 Kavita Bala 17

Specifying rotations: Euler rotations


Euler angles

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 18

Gimbal Lock

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 19

Euler angles
Gimbal lock removes one degree of freedom

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 20

http://www.youtube.com/watch?v=zc8b2Jo7mno http://www.youtube.com/watch?v=rrUCBOlJdt4

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 21

Specifying Rotations
Many ways to specify rotation
Indirectly through frame transformations Directly through Euler angles: 3 angles about 3 axes (Axis, angle) rotation: based on Eulers theorem Quaternions

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 22

Derivation of General Rotation Matrix


Axis angle rotation

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 23

Axis-angle ONB

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 24

Axis-angle rotation

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 25

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 26

Rotation Matrix for Axis-Angle

Cornell CS4620/5620 Fall 2012 Lecture 5

(with previous instructors James/Marschner)

2012 Kavita Bala 27

Das könnte Ihnen auch gefallen