Beruflich Dokumente
Kultur Dokumente
2D Affine Transformations
2D Transformations
Dr. Rahul Rai
Department of Mechanical and Aerospace Engineering
University at Buffalo - SUNY
Most of the figures are adopted from Foley/VanDam. Only few of the
figures have been created by course team!!!
2D Transformations
Outline
2D Affine Transformations
2D Affine Transformations
2D Transformations
Outline
2D Affine Transformations
2D Affine Transformations
I
Translate
Rotate
Scale
Shear
Reflect
Translation
Rotation
Uniform
scaling
Non-uniform
scaling
Shearing
2D Transformations
Reflection
Outline
2D Affine Transformations
2D Affine Transformations
I
I
I
Preserves parallels
Does not preserve lengths and angles
2D Transformations
Outline
2D Affine Transformations
2D Transforms: Translation
I
Before translation
After translation
2D Transformations
Outline
2D Affine Transformations
2D Transforms: Scale
I
In matrix form:
or just:
Before scaling
After scaling
2D Transformations
Outline
2D Affine Transformations
2D Transformations
Outline
2D Affine Transformations
In matrix form:
or just:
Before rotation
After rotation
2D Transformations
Outline
2D Affine Transformations
2D Transforms: Rotation
Substitute the 1st two equations into the 2nd two to get the
general equation:
x=r cos
y=r sin
x=r cos( + ) = r cos cos r sin sin
y=r sin( + ) = r cos sin + r sin cos
I
2D Transformations
Outline
2D Affine Transformations
Homogenous Coordinates
I
I
I
2D Transformations
Outline
2D Affine Transformations
Translation
Rotation
Uniform
scaling
Non-uniform
scaling
Shearing
2D Transformations
Reflection
Outline
2D Affine Transformations
Translation:
Scale:
Rotation:
Shear:
Reflection:
2D Transformations
Outline
2D Affine Transformations
Composition of 2D Transforms
I
Translate P1 to origin
Rotate
Translate back to P1
2D Transformations
Outline
2D Affine Transformations
Composition of 2D Transforms
I
Translate P1 to origin
Scale
Translate back to P1
2D Transformations
Outline
2D Affine Transformations
Composition of 2D Transforms
I
Translate P1 to origin
Scale
Rotate
Translate back to P1
2D Transformations
Outline
2D Affine Transformations
Composition of 2D Transforms
2D Transformations