Spatial Descriptions and Transformations

22
Spatial Descriptions and Transformations Sebastian van Delden USC Upstate [email protected]

description

Spatial Descriptions and Transformations. Sebastian van Delden USC Upstate [email protected]. Notation…. Lowercase variables are scalars Uppercase variables are vectors or matrices Leading sub- and super-scripts: identify which coordinate system a quantity is defined in: A P - PowerPoint PPT Presentation

Transcript of Spatial Descriptions and Transformations

Page 1: Spatial Descriptions and Transformations

Spatial Descriptions and Transformations

Sebastian van Delden

USC Upstate

[email protected]

Page 2: Spatial Descriptions and Transformations

Notation… Lowercase variables are scalars Uppercase variables are vectors or matrices Leading sub- and super-scripts: identify which coordinate

system a quantity is defined in: AP

A position vector in system {A}

Rotation matrix that rotates from system {B} into system {A} Trailing superscript: inverse A-1 or transpose AT

Trailing subscript: vector component (XA) or description (APBORIG)

Given angle θ1: cos θ1 == cθ1 == c1

RAB

Page 3: Spatial Descriptions and Transformations

Position Vectors

A 3x1 vector Leading superscript indicates referenced

coordinate system.

Page 4: Spatial Descriptions and Transformations

Orientation

In which direction is the point pointing… Attach a coordinate system to the point and

describe it relative to a reference system.

Page 5: Spatial Descriptions and Transformations

Orientation cont…

Write unit vectors of {B}’s three principle axes in terms of coordinate system {A}:

AXB, AYB, AZB

Can be stacked in a 3x3 matrix called a rotation matrix:

= [AXB AYB AZB] = =

The rij values are projections of {B}’s unit vectors onto the unit vectors of {A}.

RAB

Page 6: Spatial Descriptions and Transformations

Orientation cont… Recall dot product...

Consider unit vector A and B:

B . AT = .707 .707 is the projection of B onto A. Also called a “directional cosine”. Angle between vectors: cos-1(.707) = 45o

Page 7: Spatial Descriptions and Transformations

Orientation cont…

= [AXB AYB AZB] =

= or =

= [AXB AYB AZB] = I3

So, the inverse a rotation matrix is simple the transpose of that matrix. For any matrix with orthogonal

columns, its inverse is equal to its transpose.

RAB

TBARRAB RBA

TABR

RABTB

AR

Page 8: Spatial Descriptions and Transformations

Orientation cont…

Example:

Page 9: Spatial Descriptions and Transformations

“Frames”

A Frame Contains information about position and orientation of a

location 4 vectors: 3 for orientation, 1 for position

For example, frame {B} can be defined in frame {A} as: {B} = { , APBORG}RAB

Page 10: Spatial Descriptions and Transformations

Mappings

Need to express one coordinate system in terms of another.

Changing the description (position and orientation) from one frame to another is called a mapping.

Page 11: Spatial Descriptions and Transformations

Mappings: Pure Translations If the two frames different by only a position

vector (orientation is the same) then only a translation is needed.

AP = BP + APBORG

Page 12: Spatial Descriptions and Transformations

Mappings: Pure Translations cont…

Page 13: Spatial Descriptions and Transformations

Mappings: Pure Rotations

A 3x3 matrix Columns have unit magnitude Columns are {B} written in {A} Rows are {A} written in {B}

Multiple the rotation matrix and the point together:

APx = BXA . BPAPy = BYA . BPAPz = BZA . BP

AP = BPRAB

RAB

Page 14: Spatial Descriptions and Transformations

Mappings: Pure Rotations cont… Example: Pure rotation around Z

Page 15: Spatial Descriptions and Transformations

Mappings: Pure Rotations cont…

Page 16: Spatial Descriptions and Transformations

General Mappings

The two frames differ by both a translation and rotation.

AP = BP + APBORG

Example: A point BP is located at position [2 1 0]T in {B}. Frame {B} is rotated relative to frame {A} by 60o

around the Z axis. Frame {B}’s origin is translated by [3 4 0]T. What are the coordinates of the point AP in frame {A}.

RAB

Page 17: Spatial Descriptions and Transformations

Homogeneous Transformation Matrix A better way to represent general

transformations. The rotation and translation is combined into a

single 4x4 matrix.

Page 18: Spatial Descriptions and Transformations

Homogeneous Transformation Matrices cont… A 4x4 matrix is better for writing compact

equations. The bottom row is always [0 0 0 1]

These values can be modified to represent scaling and perspective factors.

Homogeneous transformations are used to represent a coordinate system or a movement.

Page 19: Spatial Descriptions and Transformations

Homogeneous Transformations cont… Pure Translation Transformations

Pure Rotation Transformations

Page 20: Spatial Descriptions and Transformations

Compound Transformations Multiple transforms are simple multiple together: AP = CPTBCT

AB

Page 21: Spatial Descriptions and Transformations

Inverse of a Homogenous Transform Given need to find :

Need to find and BPAORG from and APBORG

Rotation Part: = T

Translation Part: B(APBORG) = APBORG + BPAORG

0 = APBORG + BPAORG

BPAORG = - T APBORG

TAB TBA

RBA RAB

RBA RAB

RBARBARAB

Page 22: Spatial Descriptions and Transformations

Inverse of a Homogenous Transform Visualize Translation:

So: