rotation and orientation:rotation and orientation: fundamentals -...

22
Rotation and Orientation: Rotation and Orientation: Fundamentals

Upload: others

Post on 22-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Rotation and Orientation:Rotation and Orientation:Fundamentals

Page 2: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

QuestionsQuestions

H DOF f 2D t ti ?• How many DOFs for 2D rotation?- Answer) One

• How many DOFs for 3D rotation?• How many DOFs for 3D rotation?- Answer) Three

• How many DOFs for 4D rotation?- Answer) Six

중앙대학교 첨단영상대학원 박 경 주

Page 3: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

What is Rotation?What is Rotation?

N t i t iti• Not intuitive– Formal definitions are also confusing

• Many different ways to describe– Rotation (direction cosine) matrix– Euler angles– Axis-angle– Rotation vector– Helical angles– Unit quaternions

중앙대학교 첨단영상대학원 박 경 주

q

Page 4: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Orientation vs RotationOrientation vs. Rotation

R t ti• Rotation– Circular movement

• Orientation• Orientation– The state of being oriented– Given a coordinate system, the orientation of

an object can be represented as a rotation from a reference pose

중앙대학교 첨단영상대학원 박 경 주

Page 5: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

3D Orientation3D Orientation

Gi t bit i t ti f i id bj t• Given two arbitrary orientations of a rigid object,

How many rotations do we need t t f i t tito transform one orientation

to the other?

중앙대학교 첨단영상대학원 박 경 주

Page 6: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Joints and RotationsJoints and RotationsRotational DOFs are widely used in character animationRotational DOFs are widely used in character animation

3 translational DOFs48 t ti l DOF48 rotational DOFs

Each joint can have up to 3 DOFs

중앙대학교 첨단영상대학원 박 경 주1 DOF: knee 2 DOF: wrist 3 DOF: arm

Page 7: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Composite TransformationsComposite TransformationsA series of transformations on anA series of transformations on an

object can be applied as a series of matrix multiplicationsseries of matrix multiplications

p: position in the global coordinatep: position in the global coordinatex: position in the local coordinate

(h3 0 0)(h3, 0, 0)

중앙대학교 첨단영상대학원 박 경 주

Page 8: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

InterpolationInterpolation

I d t “ thi ” d b th• In order to “move things”, we need both translation and rotation

• Interpolating the translation is easy, but what about rotations?what about rotations?

중앙대학교 첨단영상대학원 박 경 주

Page 9: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Interpolation of OrientationInterpolation of Orientation

H b t i t l ti h t f th• How about interpolating each entry of the rotation matrix?

fExample: interpolate linearly from a positive 90 degree rotation about y axis to a negative 90 degree rotation about yabout y

중앙대학교 첨단영상대학원 박 경 주

Page 10: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Leonhard Euler(1707-1783)Leonhard Euler(1707 1783)

3D t ti• 3D rotation– Can be described by three parameters

• Euler angles: a rotation about a single Cartesian axis that moves g

with the object

- roll, pitch and yaw

중앙대학교 첨단영상대학원 박 경 주

y

Page 11: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Euler anglesEuler angles

Gi bl• Gimble– Hardware implementation f E l lof Euler angles

– Aircraft, Camera

• Gimble Lock– When two rotational axes of an object pointing in the same direction, the rotationends up losing one degree of freedom

Poor interpolation

중앙대학교 첨단영상대학원 박 경 주

- Poor interpolation

Page 12: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

QuaternionQuaternion

4 l f l b4 tuple of real numbers:

scalarvector

Same information as axis angles but in a different formg

중앙대학교 첨단영상대학원 박 경 주

Page 13: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion mathQuaternion math

U it t iUnit quaternion

Multiplication

중앙대학교 첨단영상대학원 박 경 주

Page 14: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion mathQuaternion math

C j tConjugate

InverseInverse

the unit length quaternion

중앙대학교 첨단영상대학원 박 경 주

Page 15: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion RotationQuaternion Rotation

If q is a unit quaternion and

Then qqpq-1 results in p rotating about r by theta

중앙대학교 첨단영상대학원 박 경 주

Page 16: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion RotationQuaternion Rotation

중앙대학교 첨단영상대학원 박 경 주

Page 17: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion compositionQuaternion composition

If 1 d 2 it t iIf q1 and q2 are unit quaternion

the combined rotation of first rotating by q1and then by q2 is equivalent toand then by q2 is equivalent to

중앙대학교 첨단영상대학원 박 경 주

Page 18: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Matrix formMatrix form

중앙대학교 첨단영상대학원 박 경 주

Page 19: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion interpolationQuaternion interpolation

1-angle rotation can beRepresented by a unit circle

2-angle rotation can berepresented by a unit sphereRepresented by a unit circle represented by a unit sphere

• Interpolation means moving on n-D sphereN i i 4 D h f 3 l t ti• Now imagine a 4-D sphere for 3-angle rotation

중앙대학교 첨단영상대학원 박 경 주

Page 20: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion InterpolationQuaternion Interpolation

M i b t t i t th 4D it• Moving between two points on the 4D unit sphere– A unit quaternion at each step-another point

on the 4D unit spherep– Move with constant angular velocity along the

great circle between the two points on the 4Dgreat circle between the two points on the 4D unit sphere

중앙대학교 첨단영상대학원 박 경 주

Page 21: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Quaternion interpolationQuaternion interpolation

Di t li i t l ti d t kDirect linear interpolation does not workLinearly interpolated intermediate points are not uniformly spaced when projected onto the circle

Spherical linear interpolation (SLERP)

Normalize to regain unit quaternion

중앙대학교 첨단영상대학원 박 경 주

Page 22: Rotation and Orientation:Rotation and Orientation: Fundamentals - …cau.ac.kr/~kjpark/courses/2008_2_ca/Lec5.pdf · 2008-12-02 · Orientation vs RotationOrientation vs. Rotation

Choose a representationChoose a representation

Ch th b t t ti f th• Choose the best representation for the task– Input : Euler angles– Joint Limits : Euler angles quaternion (harder)Joint Limits : Euler angles, quaternion (harder)– Interpolation : quaternion

C iti t i i t ti t i– Compositing : quaternion or orientation matrix– Rendering : orientation matrix

중앙대학교 첨단영상대학원 박 경 주