59
Lecture 2: Kinematics: Rigid Motions and Homogeneous Transformations Frames, Points and Vectors c Anton Shiriaev. 5EL158: Lecture 2 – p. 1/20

Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

  • Upload
    others

  • View
    20

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Lecture 2: Kinematics:

Rigid Motions and Homogeneous Transformations

• Frames, Points and Vectors

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 1/20

Page 2: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Lecture 2: Kinematics:

Rigid Motions and Homogeneous Transformations

• Frames, Points and Vectors

• Rotations:◦ In 2 and 3 Dimensions◦ Transformations by Rotation

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 1/20

Page 3: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Lecture 2: Kinematics:

Rigid Motions and Homogeneous Transformations

• Frames, Points and Vectors

• Rotations:◦ In 2 and 3 Dimensions◦ Transformations by Rotation

• Composition of Rotations:◦ Rotations with Respect to the Current Frame◦ Rotations with Respect to the Fixed Frame

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 1/20

Page 4: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

0 0.5 1 1.5 2 2.5 3

0

0.5

1

1.5

2

2.5

3

x0

y0

V1

o0

P

A coordinate frame in R2: the point P = [x0p, y0

p] can be

associated with the vector ~V1. Here x0p denotes x-coordinate of

point P in (x0, o0, y0)-frame, i.e. in the 0-frame.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 2/20

Page 5: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

0 0.5 1 1.5 2 2.5 3

0

0.5

1

1.5

2

2.5

3

x0

y0

V1

o0

P x1y

1

V2

o1

Two coordinate frames in R2: the point P = [x0p, y0

p] = [x1p, y1

p]

can be associated with vectors ~V1 and ~V2. Here x1p denotes

x-coordinate of point P in the 1-frame.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 2/20

Page 6: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Frames, Points and Vectors

• A point corresponds a particular location in the space.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 3/20

Page 7: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Frames, Points and Vectors

• A point corresponds a particular location in the space.

• A point has different representation (coordinates) in differentframes.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 3/20

Page 8: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Frames, Points and Vectors

• A point corresponds a particular location in the space.

• A point has different representation (coordinates) in differentframes.

• A vector is defined by direction and magnitude.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 3/20

Page 9: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Frames, Points and Vectors

• A point corresponds a particular location in the space.

• A point has different representation (coordinates) in differentframes.

• A vector is defined by direction and magnitude.

• Vectors with the same direction and magnitude are thesame.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 3/20

Page 10: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

0 0.5 1 1.5 2 2.5 3 3.5

0

0.5

1

1.5

2

2.5

3

3.5

x0

y0

V10

o0

P x1y

1

o1

The coordinates of the vector ~V1 in the 0-frame [x0p, y0

p].

What would be coordinates of ~V1 in the 1-frame?

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 4/20

Page 11: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

0 0.5 1 1.5 2 2.5 3 3.5

0

0.5

1

1.5

2

2.5

3

3.5

x0

y0

V10

o0

P x1y

1

o1

V11

We need to consider the vector ~V 11

of the same direction and

magnitude as ~V1 but with the origin in o1. Conclusion: we cansum vectors only if they are expressed in parallel frames.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 4/20

Page 12: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Lecture 2: Kinematics:

Rigid Motions and Homogeneous Transformations

• Frames, Points and Vectors

• Rotations:◦ In 2 and 3 Dimensions◦ Transformations by Rotation

• Composition of Rotations:◦ Rotations with Respect to the Current Frame◦ Rotations with Respect to the Fixed Frame

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 5/20

Page 13: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

To find an appropriate way to parametrize rotations in 2-D, let ustrack vectors x0

1(·), y0

1(·) as θ varies, i.e.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 6/20

Page 14: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

To find an appropriate way to parametrize rotations in 2-D, let ustrack vectors x0

1(·), y0

1(·) as θ varies, i.e.

x01(θ) =

[cos(θ)

sin(θ)

], y0

1(θ) = x0

1

(θ+

π

2

)=

[cos

(θ+ π

2

)

sin(θ+ π

2

)]

=

[− sin(θ)

cos(θ)

]

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 6/20

Page 15: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

The matrix

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

is called the rotation matrix.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 7/20

Page 16: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

The matrix

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

is called the rotation matrix.

It has a number of interesting properties:

• det R(θ) = cos2(θ) + sin2(θ) = 1

• R(θ)−1 =

[a b

c d

]−1

=1

det R(θ)

[d −b

−c a

]

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 7/20

Page 17: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

The matrix

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

is called the rotation matrix.

It has a number of interesting properties:

• det R(θ) = cos2(θ) + sin2(θ) = 1

• R(θ)−1 =

[cos(θ) sin(θ)

− sin(θ) cos(θ)

]= RT (θ)

A n × n-matrix X that satisfies the property, X−1 = XT

⇒{XXT = In, det(XXT ) = 1 = det(X) det(XT ) = det(X)2

}

is called orthogonal, X ∈ O(n). If det X = 1 ⇒ X ∈ SO(n)

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 7/20

Page 18: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

Let us consider another way for computing

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 8/20

Page 19: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

Let us consider another way for computing

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

As known, scalar product between two vectors is

~a ·~b = a1b1 + a2b2 + a3b3 = |~a| · |~b| · cos

(~̂a,~b

)

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 8/20

Page 20: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

Let us consider another way for computing

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

As known, scalar product between two vectors is

~a ·~b = a1b1 + a2b2 + a3b3 = |~a| · |~b| · cos

(~̂a,~b

)

All vectors of coordinate frames of magnitude 1, therefore

x01(θ) =

[x0

1(θ) · x0

x01(θ) · y0

], y0

1(θ) =

[y01(θ) · x0

y01(θ) · y0

]

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 8/20

Page 21: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 2-D

Let us consider another way for computing

R(θ) =[x0

1(θ)| y0

1(θ)

]=

[cos(θ) − sin(θ)

sin(θ) cos(θ)

]

As known, scalar product between two vectors is

~a ·~b = a1b1 + a2b2 + a3b3 = |~a| · |~b| · cos

(~̂a,~b

)

All vectors of coordinate frames of magnitude 1, therefore

x01(θ) =

[x0

1(θ) · x0

x01(θ) · y0

], y0

1(θ) =

[y01(θ) · x0

y01(θ) · y0

]

⇒ R(θ) =[x0

1(θ)| y0

1(θ)

]=

[x0

1(θ) · x0 y0

1(θ) · x0

x01(θ) · y0 y0

1(θ) · y0

]

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 8/20

Page 22: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 3-D

Rotation matrix for 3-dimensions is then

R01(θ) =

[x0

1(θ)| y0

1(θ)| z0

1(θ)

]

=

x01(θ) · x0 y0

1(θ) · x0 z0

1(θ) · x0

x01(θ) · y0 y0

1(θ) · y0 z0

1(θ) · y0

x01(θ) · z0 y0

1(θ) · z0 z0

1(θ) · z0

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 9/20

Page 23: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 3-D

Rotation matrix for 3-dimensions is then

R01(θ) =

[x0

1(θ)| y0

1(θ)| z0

1(θ)

]

=

x01(θ) · x0 y0

1(θ) · x0 z0

1(θ) · x0

x01(θ) · y0 y0

1(θ) · y0 z0

1(θ) · y0

x01(θ) · z0 y0

1(θ) · z0 z0

1(θ) · z0

Properties to check:

• Columns of R01(·) are mutually orthogonal, for instance

[x0

1(θ)x0, x0

1(θ)y0, x0

1(θ)z0

] [y01(θ)x0, y0

1(θ)y0, y0

1(θ)z0

]T=

= x01(θ) · y0

1(θ)︸ ︷︷ ︸

= 0

·|x0|2 + x01(θ) · y0

1(θ)︸ ︷︷ ︸

= 0

·|y0|2 + x01(θ) · y0

1(θ)︸ ︷︷ ︸

= 0

·|z0|2

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 9/20

Page 24: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 3-D

Rotation matrix for 3-dimensions is then

R01(θ) =

[x0

1(θ)| y0

1(θ)| z0

1(θ)

]

=

x01(θ) · x0 y0

1(θ) · x0 z0

1(θ) · x0

x01(θ) · y0 y0

1(θ) · y0 z0

1(θ) · y0

x01(θ) · z0 y0

1(θ) · z0 z0

1(θ) · z0

Properties to check:

• Columns of R01(·) are mutually orthogonal;

• R01(θ)

[R0

1(θ)

]T= I3

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 9/20

Page 25: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotations in 3-D

Rotation matrix for 3-dimensions is then

R01(θ) =

[x0

1(θ)| y0

1(θ)| z0

1(θ)

]

=

x01(θ) · x0 y0

1(θ) · x0 z0

1(θ) · x0

x01(θ) · y0 y0

1(θ) · y0 z0

1(θ) · y0

x01(θ) · z0 y0

1(θ) · z0 z0

1(θ) · z0

Properties to check:

• Columns of R01(·) are mutually orthogonal;

• R01(θ)

[R0

1(θ)

]T= I3

• det R01(θ) = 1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 9/20

Page 26: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example of Rotation in 3-D

1-Frame is rotated through θ-angle around z0-axis.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 10/20

Page 27: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example of Rotation in 3-D

1-Frame is rotated through θ-angle around z0-axis.

x01(θ)x0 = cos θ y0

1(θ)x0 = − sin θ z0

1(θ)x0 = 0

x01(θ)y0 = sin θ y0

1(θ)y0 = cos θ z0

1(θ)y0 = 0

x01(θ)z0 = 0 y0

1(θ)z0 = 0 z0

1(θ)z0 = 1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 10/20

Page 28: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example of Rotation in 3-D

1-Frame is rotated through θ-angle around z0-axis.

R01(θ) =

cos θ − sin θ 0

sin θ cos θ 0

0 0 1

{=: Rz,θ

}

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 10/20

Page 29: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example of Rotation in 3-D

1-Frame is rotated through θ-angle around z0-axis.

This basic rotation matrix clearly satisfies the properties

Rz,0 = I3, Rz,θRz,φ = Rz,θ+φ, [Rz,θ]−1 = Rz,−θ

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 10/20

Page 30: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Basic Rotations in 3-D

In the way we have introduced the basic rotation matrix

Rz,θ =

cos θ − sin θ 0

sin θ cos θ 0

0 0 1

we can introduce basic rotation matrices

Rx,θ, Ry,θ

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 11/20

Page 31: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Basic Rotations in 3-D

In the way we have introduced the basic rotation matrix

Rz,θ =

cos θ − sin θ 0

sin θ cos θ 0

0 0 1

we can introduce basic rotation matrices

Rx,θ, Ry,θ

They are

Rx,θ =

1 0 0

0 ∗ ∗

0 ∗ ∗

, Ry,θ =

∗ 0 ∗

0 1 0

∗ 0 ∗

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 11/20

Page 32: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Basic Rotations in 3-D

In the way we have introduced the basic rotation matrix

Rz,θ =

cos θ − sin θ 0

sin θ cos θ 0

0 0 1

we can introduce basic rotation matrices

Rx,θ, Ry,θ

They are

Rx,θ =

1 0 0

0 cos θ − sin θ

0 sin θ cos θ

, Ry,θ =

cos θ 0 sin θ

0 1 0

− sin θ 0 cos θ

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 11/20

Page 33: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The 0-frame is our world, the 1-frame is fixed to a rigid body.

What will happen with points of body (let say p)if we rotate the body, i.e. the 1-frame?

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 12/20

Page 34: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

How to trace the change of position of the point in the 0-frame?

Let say, we are interested in coordinates of the point p, in the1-frame they are constant, but the 0-frame they are changed!

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 12/20

Page 35: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The coordinates of point p in the 1-frame is p1 = [u, v, w]T , i.e.

p1 = u · ~x1 + v · ~y1 + w · ~z1

and the coordinates u, v, w do not change when the 1-frame isrotated. We need to find the coordinates of p in the 0-frame.

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 13/20

Page 36: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The coordinates of point p in the 1-frame is p1 = [u, v, w]T , i.e.

p1 = u · ~x1 + v · ~y1 + w · ~z1

and the coordinates u, v, w do not change when the 1-frame isrotated. We need to find the coordinates of p in the 0-frame.

Clearly, with the rotation the basis of the 1-frame is changingand we know how it does that!

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 13/20

Page 37: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The coordinates of point p in the 1-frame is p1 = [u, v, w]T , i.e.

p1 = u · ~x1 + v · ~y1 + w · ~z1

and the coordinates u, v, w do not change when the 1-frame isrotated. We need to find the coordinates of p in the 0-frame.

Clearly, with the rotation the basis of the 1-frame is changingand we know how it does that!

For instance,

x01

=

x1 · x0

x1 · y0

x1 · z0

=

x01

· x0 y01

· x0 z01

· x0

x01

· y0 y01

· y0 z01

· y0

x01

· z0 y01

· z0 z01

· z0

︸ ︷︷ ︸= R

1

0

0

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 13/20

Page 38: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The coordinates of point p in the 1-frame is p1 = [u, v, w]T , i.e.

p1 = u · ~x1 + v · ~y1 + w · ~z1

and the coordinates u, v, w do not change when the 1-frame isrotated. We need to find the coordinates of p in the 0-frame.

For instance,

x01

= R

1

0

0

, y0

1= R

0

1

0

, z0

1= R

0

0

1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 13/20

Page 39: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The coordinates of point p in the 1-frame is p1 = [u, v, w]T , i.e.

p1 = u · ~x1 + v · ~y1 + w · ~z1

and the coordinates u, v, w do not change when the 1-frame isrotated. We need to find the coordinates of p in the 0-frame.

For instance,

x01

= R

1

0

0

, y0

1= R

0

1

0

, z0

1= R

0

0

1

p0 = u · x01+ v · y0

1+ w · z0

1= R

u

0

0

+ R

0

v

0

+ R

0

0

w

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 13/20

Page 40: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Transformations by Rotations in 3-D

The coordinates of point p in the 1-frame is p1 = [u, v, w]T , i.e.

p1 = u · ~x1 + v · ~y1 + w · ~z1

and the coordinates u, v, w do not change when the 1-frame isrotated. We need to find the coordinates of p in the 0-frame.

For instance,

x01

= R

1

0

0

, y0

1= R

0

1

0

, z0

1= R

0

0

1

p0 = u · x01+ v · y0

1+ w · z0

1= R

u

v

w

= R0

1p1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 13/20

Page 41: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Lecture 2: Kinematics:

Rigid Motions and Homogeneous Transformations

• Frames, Points and Vectors

• Rotations:◦ In 2 and 3 Dimensions◦ Transformations by Rotation

• Composition of Rotations:◦ Rotations with Respect to the Current Frame◦ Rotations with Respect to the Fixed Frame

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 14/20

Page 42: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Current Frame:

Suppose that we have 3 frames:

(o0, x0, y0, z0), (o1, x1, y1, z1), (o2, x2, y2, z2).

Any point p will have three representations:

p0 = [u0, v0, w0]T , p1 = [u1, v1, w1]

T , p2 = [u2, v2, w2]T

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 15/20

Page 43: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Current Frame:

Suppose that we have 3 frames:

(o0, x0, y0, z0), (o1, x1, y1, z1), (o2, x2, y2, z2).

Any point p will have three representations:

p0 = [u0, v0, w0]T , p1 = [u1, v1, w1]

T , p2 = [u2, v2, w2]T

We know that

p0 = R01

p1, p1 = R12

p2, p0 = R02

p2

How are the matrices R01, R1

2and R0

2related?

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 15/20

Page 44: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Current Frame:

Suppose that we have 3 frames:

(o0, x0, y0, z0), (o1, x1, y1, z1), (o2, x2, y2, z2).

Any point p will have three representations:

p0 = [u0, v0, w0]T , p1 = [u1, v1, w1]

T , p2 = [u2, v2, w2]T

We know that

p0 = R01

p1, p1 = R12

p2, p0 = R02

p2

How are the matrices R01, R1

2and R0

2related?

We can compute p0 in two different ways

p0 = R01

p1 = R01

R12

p2, p0 = R02

p2

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 15/20

Page 45: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Current Frame:

Suppose that we have 3 frames:

(o0, x0, y0, z0), (o1, x1, y1, z1), (o2, x2, y2, z2).

Any point p will have three representations:

p0 = [u0, v0, w0]T , p1 = [u1, v1, w1]

T , p2 = [u2, v2, w2]T

We know that

p0 = R01

p1, p1 = R12

p2, p0 = R02

p2

How are the matrices R01, R1

2and R0

2related?

We can compute p0 in two different ways

p0 = R01

p1 = R01

R12

p2, p0 = R02

p2

⇒ R01

R12

≡ R02

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 15/20

Page 46: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example 2.5:

Suppose we rotate• first the frame by angle φ around current y-axis,• then rotate by angle θ around the current z-axis.

Find the combined rotation

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 16/20

Page 47: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example 2.5:

The rotations around y- and z-axis are basic rotations

Ry,φ =

cos φ 0 sin φ

0 1 0

− sin φ 0 cos φ

, Rz,θ =

cos θ − sin θ 0

sin θ cos θ 0

0 0 1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 16/20

Page 48: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example 2.5:

Therefore the overall rotation is

R = Ry,φRz,θ =

cos φ 0 sin φ

0 1 0

− sin φ 0 cos φ

cos θ − sin θ 0

sin θ cos θ 0

0 0 1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 16/20

Page 49: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example 2.5:

Therefore the overall rotation is

R = Ry,φRz,θ =

cφcθ −cφsθ sφ

sθ cθ 0

−sφcθ sφsθ cφ

,

{⇒ p0 = R p2

}

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 16/20

Page 50: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example 2.5:

Important Observation: Rotations do not commute

Ry,φRz,θ 6= Rz,θRy,φ

So that the order of rotations is important!

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 17/20

Page 51: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Example 2.5:

Important Observation: Rotations do not commute

Ry,φRz,θ 6= Rz,θRy,φ

So that the order of rotations is important!

Indeed

Ry,φRz,θ =

cφcθ −cφsθ sφ

sθ cθ 0

−sφcθ sφsθ cφ

and

Rz,θRy,φ =

cφcθ −sθ cθsφ

sθcφ cθ sφsθ

−sφ 0 cφ

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 17/20

Page 52: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

How to compute the rotation if the basic rotations are done withrespect to fixed frames?

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 18/20

Page 53: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

Given two frames and the rotation:

(o0, x0, y0, z0), (o1, x1, y1, z1), p0 = R01p1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 19/20

Page 54: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

Given two frames and the rotation:

(o0, x0, y0, z0), (o1, x1, y1, z1), p0 = R01p1

Given a linear transform A, for which we know how it acts onvectors of the 0-frame

~a0 = A~b0

How it acts on the vectors of the 1-frame?

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 19/20

Page 55: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

Given two frames and the rotation:

(o0, x0, y0, z0), (o1, x1, y1, z1), p0 = R01p1

Given a linear transform A, for which we know how it acts onvectors of the 0-frame

~a0 = A~b0

How it acts on the vectors of the 1-frame?

To compute its action, we need to observe that vectors in bothframes are in one-to-one correspondence, i.e

• given b0, then b1 =[R0

1

]−1

b0

• given b1, then b0 = R01b1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 19/20

Page 56: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

Given two frames and the rotation:

(o0, x0, y0, z0), (o1, x1, y1, z1), p0 = R01p1

To compute its action, we need to observe that vectors in bothframes are in one-to-one correspondence, i.e

• given b0, then b1 =[R0

1

]−1

b0

• given b1, then b0 = R01b1

To define A acting in the 1-frame, use its definition in 0-frame

[R0

1

]−1

a0

︸ ︷︷ ︸= a1

=[R0

1

]−1

Ab0 =[R0

1

]−1

AR01︸ ︷︷ ︸

B

b1

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 19/20

Page 57: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

We have two rotations• the basic rotation R0

1= Ry0,φ: by angle φ around y0-axis

• the rotation R12

defined as the rotation by angle θ aroundz0-axis (not z1-axis)

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 20/20

Page 58: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

We have two rotations• the basic rotation R0

1= Ry0,φ: by angle φ around y0-axis

• the rotation R12

defined as the rotation by angle θ aroundz0-axis (not z1-axis)

The combined rotation will be

R02

= R01R1

2= Ry0,φR1

2= Ry0,φ

[{Ry0,φ}−1 Rz0,θRy0,φ

]

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 20/20

Page 59: Lecture 2: Kinematics: Rigid Motions and Homogeneous ......Rigid Motions and Homogeneous Transformations • Frames, Points and Vectors • Rotations: In 2 and 3 Dimensions Transformations

Rotation with Respect to the Fixed Frame:

We have two rotations• the basic rotation R0

1= Ry0,φ: by angle φ around y0-axis

• the rotation R12

defined as the rotation by angle θ aroundz0-axis (not z1-axis)

The combined rotation will be

R02

= Ry0,φ

[{Ry0,φ}−1 Rz0,θRy0,φ

]= Rz0,θRy0,φ

c©Anton Shiriaev. 5EL158: Lecture 2 – p. 20/20