rotations and translations cherevatsky boris. mathematical terms the inner product of 2 vectors a,b...

31
Rotations and Translations Cherevatsky Boris

Upload: peregrine-strickland

Post on 11-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Rotations and Translations

Cherevatsky Boris

Page 2: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Mathematical terms The inner product of 2 vectors a,b is defined as:

The cross product of 2 vectors is defined as:

A unit vector will be marked as:

, , , , ,x y z x y z x x y y z za a a a b b b b a b a b a b a b

X

Page 3: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Representing a Point 3D A three-dimensional point

A is a reference coordinate system

here

z

y

xA

p

p

p

P

Page 4: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Representing a Point 3D (cont.)

Once a coordinate system is fixed, we can locate any point in the universe with a 3x1 position vector.

The components of P in {A} have numerical values which indicate distances along the axes of {A}.

To describe the orientation of a body we will attach a coordinate system to the body and then give a description of this coordinate system relative to the reference system.

Page 5: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example

0

2

1

PB ?PA

30

134.05.02866.0)30sin()30cos( 00 YB

XB

XA PPP

232.2YAP

000.0

232.2

134.0

0

2

1

*

000.1000.0000.0

000.0866.0500.0

000.0500.0866.0

PA

000.0ZAP

AX

BX

AYBY

PB

30

Page 6: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Description of Orientation

ˆˆˆˆˆˆ

ˆˆ ˆˆ ˆˆ

ˆˆ ˆˆ ˆˆ

ˆˆˆ

ABABAB

ABABAB

ABABAB

BA

BA

BAA

B

ZZZYZX

YZYYYX

XZXYXX

ZYXR

BX

AX

BX

AYBY

is a unit vector in B

is a coordinate of a unit vector of B in coordinates system A (i.e. the projection of onto the unit direction of its reference)

BA X

BX

Page 7: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example Rotating B relative to A around Z by30

000.1000.0000.0

000.0866.0500.0

000.0500.0866.0

RAB

AX

BX

AYBY

Page 8: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example In general:

AX

BX

AYBY

100

0cossin

0sincos

ZABR

Page 9: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Using Rotation Matrices

PRP BAB

A

Page 10: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Translation

AX

AY

AZ

BX

BY

BZ

PB

BORGAP

BORGABA PPP

Page 11: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Combining Rotation and Translation

BORGABA

BA PPRP

AX

BX

PB

BORGAP

PAAY

BY

Page 12: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

What is a Frame ? A set of four vectors giving position and

orientation information. The description of the frame can be

thought as a position vector and a rotation matrix.

Frame is a coordinate system, where in addition to the orientation we give a position vector which locates its origin relative to some other embedding frame.

Page 13: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Arrows Convention An Arrow - represents a vector drawn

from one origin to another which shows the position of the origin at the head of the arrow in terms of the frame at the tail of the arrow. The direction of this locating arrow tells us that {B} is known relative to {A} and not vice versa.

Mapping a vector from one frame to another – the quantity itself is not changed, only its description is changed.

Page 14: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Rotating a frame B relative to a frame A about Z axis by degrees and moving it 10 units in direction of X and 5 units in the direction of Y. What will be the coordinates of a point in frame A if in frame B the point is : [3, 7, 0]T?

Example

30

000.0

562.12

098.9

000.0

000.5

000.10

0.000

7.562

0.902-

000.0

000.5

000.10

000.0

000.7

000.3

000.1000.0000.0

000.0866.0500.0

000.0500.0866.0

PA

Page 15: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Extension to 4x4

110001

PPRP BBORG

AAB

A

We can define a 4x4 matrix operator and use a 4x1 position vector

Page 16: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example

If we use the above example we can see that:

1000

000.0000.1000.0000.0

000.5000.0866.0500.0

000.10000.0500.0866.0

TAB

Page 17: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

P in the coordinate system A

1

000.0

562.12

098.9

1

000.0

000.7

000.3

1000

000.0000.1000.0000.0

000.5000.0866.0500.0

000.10000.0500.0866.0

PA

Page 18: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Formula

PTP BAB

A

Page 19: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Compound Transformation

PTP BAB

A PTP CBC

B

PTTP CBC

AB

A TTT BC

AB

AC

Page 20: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Several Combinations

TTT

TTTT

TT

TTTTTT

BC

UB

UC

DC

DA

UA

UC

AU

UA

DC

BC

UB

DA

UA

UD

1

1

11

Page 21: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example

Page 22: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example

000.1000.0000.0000.0

000.0000.1000.0000.0

000.0000.0000.1000.0

000.3000.0000.0000.1

TAB

000.1000.0000.0000.0

000.2000.0000.0000.1

000.0500.0866.0000.0

000.0866.0500.0000.0

TBC

Page 23: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

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.

Page 24: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

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.

How can we compute the axis of rotation? (Eigenvector corresponding to eigenvalue 1).

Page 25: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Quaternions

The quaternion group has 8 members:

Their product is defined by the equation:

, , , 1i j k

2 2 2 1i j k ijk

Page 26: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

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.

Q s ia jb kc s v

, , ,Q s a b c

Page 27: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

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.

K

1 2 3 42 2ˆ ˆ( , ) (cos( ) sin( ) ) ( , , , )Rot K K

Page 28: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Example

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

31 1

2 2 2

(cos(45 ) sin(45 ) )(cos(45 ) sin(45 ) )

( )( ) cos(60 )

3

( ),120

3

o o o o

o

o

k i

i j ki j k

i j kRot

Page 29: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

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) !

Page 30: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Rotating with quaternionsThe 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 )

Page 31: Rotations and Translations Cherevatsky Boris. Mathematical terms The inner product of 2 vectors a,b is defined as: The cross product of 2 vectors is defined

Rodrigues formula

We would like to rotate a vector v around a unit vector u with angle the rotated vector will be:

cos sin , (1 cos )rotv v u v u v u