Affine Transformations and homogeneous coordinates Homogeneous Coordinates A

  • Slides: 15
Download presentation
Affine Transformations and homogeneous coordinates

Affine Transformations and homogeneous coordinates

Homogeneous Coordinates A computational convenience

Homogeneous Coordinates A computational convenience

Coordinate systems • To represent a location (point) in 3 D space one needs

Coordinate systems • To represent a location (point) in 3 D space one needs 3 numbers (X, Y, Z) • Each value specifies a distance along the respective coordinate axis • The resultant location (point) is the sum of the axis unit vectors multiplied by the values

Manipulating points • As we will see soon, manipulations of points in 3 space

Manipulating points • As we will see soon, manipulations of points in 3 space are generally performed using matrix notation • But, as it turns out, this is not readily done using points represented by 3 values • Something better is needed…

Homogeneous coordinates • Homogeneous coordinates were introduced as a means of facilitating matrix-based transformations

Homogeneous coordinates • Homogeneous coordinates were introduced as a means of facilitating matrix-based transformations applied to points • It is a 4 D representation of a 3 D point (X, Y, Z) → (X, Y, Z, 1. 0) (X/W, Y/W, Z/W) → (X, Y, Z, W) • That’s really all you need to know about homogeneous coordinates

Matrix Operations Uses of Matrix Multiplication

Matrix Operations Uses of Matrix Multiplication

Translation • To move a point (X, Y, Z) by amounts (x, y, z):

Translation • To move a point (X, Y, Z) by amounts (x, y, z):

Scale • To “scale” a point (X, Y, Z) by sizes (x, y, z):

Scale • To “scale” a point (X, Y, Z) by sizes (x, y, z):

Rotate X • To “rotate” a point (X, Y, Z) about the X axis

Rotate X • To “rotate” a point (X, Y, Z) about the X axis by an angle Θ:

Rotate Y • To “rotate” a point (X, Y, Z) about the Y axis

Rotate Y • To “rotate” a point (X, Y, Z) about the Y axis by an angle Θ:

Rotate Z • To “rotate” a point (X, Y, Z) about the Z axis

Rotate Z • To “rotate” a point (X, Y, Z) about the Z axis by an angle Θ:

Shear X • To “shear” a point (X, Y, Z) int the X direction

Shear X • To “shear” a point (X, Y, Z) int the X direction by an angle Θ:

Shear Y • To “shear” a point (X, Y, Z) in the Y direction

Shear Y • To “shear” a point (X, Y, Z) in the Y direction by an angle Θ:

Shear Z • To “shear” a point (X, Y, Z) in the Z direction

Shear Z • To “shear” a point (X, Y, Z) in the Z direction by an angle Θ:

Combining matrices • Rotation about an arbitrary axis is performed by combining matrices –

Combining matrices • Rotation about an arbitrary axis is performed by combining matrices – Thus the need for homogeneous coordinates – Axis is a unit vector from <0, 0, 0> to <Px, Py, Pz> Translate to point Rotate -Θ about X Rotate Θ about Z Rotate -Θ about Y Rotate Θ about X Translate to origin