rotations and projective space · 1d projective space reps. 1. all lines through the origin 2....

81
Rotations and Projective Space

Upload: others

Post on 18-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotations andProjective Space

Page 2: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotations (in 2D)

Spins points about origin; vectors about their tails

Page 3: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotation vs Orientation

Rotation is a transformation

Rotation of rest pose is orientation

rest pose

Page 4: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotations (in 2D)

In 2D rotations are simple: parameterized by single angle

Page 5: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotations (in 2D)

In 2D rotations are simple: parameterized by single angle

• “one dimensional”

Page 6: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotations (in 2D)

In 2D rotations are simple: parameterized by single angle

• “one dimensional”

• periodic

Page 7: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotation Group

2D rotations form a group called

• compositions of rotations are rotations

Page 8: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotation Group

2D rotations form a group called

• compositions of rotations are rotations

• rotations have inverses

Page 9: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotation Matrices (in 2D)

Rotations are linear (why)?

Page 10: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotation Matrices (in 2D)

Rotations are linear (why)?

Rotations can be represented by matrix (why)?

Page 11: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotation Matrices (in 2D)

Rotations are linear (why)?

Rotations can be represented by matrix (why)?

Formula:

Page 12: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

3D Rotations and Orientations

3D rotations still linear, still form group

• rotations don’t commute!!

Page 13: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

3D Rotations and Orientations

3D rotations still linear, still form group

• rotations don’t commute!!

But compared to 2D, very tricky

Page 14: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

What We Want To Do With Rots

1. Write them down (represent them)

Page 15: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

What We Want To Do With Rots

1. Write them down (represent them)

2. Use them to rotate points/vectors

Page 16: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

What We Want To Do With Rots

1. Write them down (represent them)

2. Use them to rotate points/vectors

3. Compose them

Page 17: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

What We Want To Do With Rots

1. Write them down (represent them)

2. Use them to rotate points/vectors

3. Compose them

4. Interpolate them

• interpolate: smoothly blend

Page 18: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Three orthogonal, unit vectors

Representation 1: Frames

Page 19: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Three orthogonal, unit vectors

Actually only need two:

Representation 1: Frames

Page 20: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 1: Frames

Pros:

• intuitive

Cons:

• needs six numbers

• complicated orthonormality condition

• composition: unclear

• interpolation: no chance

Page 21: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 2: Matrices

Page 22: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 2: Matrices

columns unit vectors

columns orthogonal

Page 23: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 2: Matrices

columns unit vectors

columns orthogonal

Page 24: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 2: Matrices

Pros

• composition easy

• applying rotation easy

Cons

• needs nine numbers

• complicated condition

• interpolation: no chance

Page 25: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Special Case: Rotation about Axis

Page 26: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Special Case: Rotation about Axis

Idea:

Page 27: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 3: Euler Angles

Page 28: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 3: Euler Angles

common in aviation

order matters!

Page 29: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Gimbal Lock

When first rotation aligns other axes

Rotations get “stuck”

Page 30: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Apollo 11 Gimbal Lock

Page 31: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 3: Euler Angles

Pros:

• just three numbers

• easy to convert to matrix

Cons

• complicated to apply/compose

• interpolation: gimbal lock

Page 32: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Axis-angle

Geometry fact: every rotation fixes an axis

represent rotation as:• axis• angle

Page 33: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Axis-angle

Geometry fact: every rotation fixes an axis

represent rotation as:• axis• angle

…or “axis-angle”

Page 34: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Axis-angle

Converting to matrix not simple

Rodrigues Rotation Formula:

Page 35: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Axis-angle

Pros:

• very intuitive

• only three numbers

Cons:

• complicated + slow to compose/apply

• interpolation: complicated

Page 36: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Quaternions

What is a quaternion?

• like complex numbers, but threeimaginary dimensions

Page 37: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Quaternions

What is a quaternion?

• like complex numbers, but threeimaginary dimensions

• cyclic relationship

Page 38: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Quaternions

Turns out rotations can be represented by unit quaternions

Rotation about axis :

Page 39: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Quaternions

Turns out rotations can be represented by unit quaternions

Rotation about axis :

Acts on points/vectors by conjugation:

Page 40: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Why Are Quaternions Rotations?

…don’t worry about it.

Page 41: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

SLERP

Spherical Linear Interpolation

• smoothly blends two rotations

Page 42: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

SLERP

Spherical Linear Interpolation

• smoothly blends two rotations

Why not interpolate rotations?

Page 43: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

SLERP

Spherical Linear Interpolation

• smoothly blends two rotations

Turns out easy to do with quaternions

• don’t worry about the mechanics

Page 44: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Representation 4: Quaternions

Pros:

• just four numbers

• easy to compose

• easy to interpolate

Cons:

• unintuitive

Page 45: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Rotations in Practice

Shaders work with matrices at end of day

High-performance intermediate computation is done with quaternions

Axis-angle most intuitive for camera controls and physics

Page 46: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Recall: Pinhole Camera

Page 47: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Pinhole Camera: Consequences

We see only projection of the world

Page 48: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Pinhole Camera: Consequences

We see only projection of the world

• many-to-one mapping

• distance vs scale ambiguity

Page 49: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Distance vs Scale Ambiguity

How we work around it:

• “deep learning”

• depth cues

Page 50: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Distance vs Scale Ambiguity

How we work around it:

• “deep learning”

• depth cues

we assume:similar objects have

similar shapes & sizes

Page 51: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Distance vs Scale Ambiguity

How we work around it:

• “deep learning”

• depth cues

• throw hardware at problem:binocular vision

Page 52: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Monocular Vision Many-to-One

Points in space wrong abstraction

Page 53: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space

Space of lines through origin

Page 54: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

Page 55: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

Note:no notion of sign

Page 56: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

2. Circle with antipodal points glued

Note:no notion of sign

Page 57: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

2. Circle with antipodal points glued

3. Interval with boundary glued

Page 58: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

2. Circle with antipodal points glued

3. Interval with boundary glued

4. The real line…

Page 59: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

2. Circle with antipodal points glued

3. Interval with boundary glued

4. The real line… plus “point at infinity”

Page 60: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

2. Circle with antipodal points glued

3. Interval with boundary glued

4. The real line… plus “point at infinity”

• “ends” of line meet at infinity

Page 61: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

1D Projective Space Reps.

1. All lines through the origin

2. Circle with antipodal points glued

3. Interval with boundary glued

4. The real line… plus “point at infinity”

5. Homogeneous coordinates

Page 62: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Homogeneous Coordinates

All homogeneous coordinates

represent same line

Page 63: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Homogeneous Coordinates

All homogeneous coordinates

represent same line

• say (“are equivalent”)

Page 64: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Homogeneous Coordinates

All homogeneous coordinates

represent same line

• say (“are equivalent”)

All points in 1D projective space equiv to:

1.

2.

Page 65: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Homogeneous Coordinates

All homogeneous coordinates

represent same line

• say (“are equivalent”)

All points in 1D projective space equiv to:

Page 66: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

2D Projective Plane

1. All lines through the origin

2. Sphere with antipodal points glued

Page 67: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

2D Projective Plane

1. All lines through the origin

2. Sphere with antipodal points glued

3. Radius disk with boundary glued

Page 68: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

2D Projective Plane

1. All lines through the origin

2. Sphere with antipodal points glued

3. Radius disk with boundary glued

what does this look like?

Page 69: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

Boy’s Surface

Page 70: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

2D Projective Plane

1. All lines through the origin

2. Sphere with antipodal points glued

3. Radius disk with boundary glued

4. Plane plus “line at infinity”

Page 71: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

2D Projective Plane

1. All lines through the origin

2. Sphere with antipodal points glued

3. Radius disk with boundary glued

4. Plane plus “line at infinity”

5. Homogeneous coordinates

Page 72: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

on projective plane, all lines intersect at one point

Page 73: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

2D Projective Plane

1. All lines through the origin

2. Sphere with antipodal points glued

3. Radius disk with boundary glued

4. Plane plus “line at infinity”

5. Homogeneous coordinates

Page 74: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

3D Projective Space

1. All lines through the origin

2. Hypersphere with antipodal pts glued

3. Radius ball with boundary glued

Page 75: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

3D Projective Space

1. All lines through the origin

2. Hypersphere with antipodal pts glued

3. Radius ball with boundary glued

remind you of anything?

Page 76: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

3D Projective Space

1. All lines through the origin

2. Hypersphere with antipodal pts glued

3. Radius ball with boundary glued

4. Rotations in 3D (axis-angle)!

remind you of anything?

Page 77: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

3D Projective Space

1. All lines through the origin

2. Hypersphere with antipodal pts glued

3. Radius ball with boundary glued

4. Rotations in 3D (axis-angle)!

5. Homogeneous coordinates

Page 78: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

A Final Note

What does shear do in projective space?

Page 79: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

A Final Note

What does shear do in projective space?

Page 80: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

A Final Note

What does shear do in projective space?

• points on line translate

Page 81: Rotations and Projective Space · 1D Projective Space Reps. 1. All lines through the origin 2. Circle with antipodal points glued 3. Interval with boundary glued 4. The real line…

A Final Note

What does shear do in projective space?

• points on line translate

• point at infinity untouched