2 - Linear and Affine Transformations Flashcards
linear transformations:
Transformations affected by a matrix product .
- rotation,
- scaling,
- shear
- mirroring
Rotation around origin
Cos(θ) -Sin(θ)
Sin(θ) Cos(θ)
Leaves length of matrix unchanged
Scaling
the scale matrix below is essentially a modified identity matrix
Isotropic = Equal entries on the diagonal ( makes something bigger or smaller without changing the aspect ratio)
Anisotropic = Different entries on the diagonal
| λ1 0 | |x|
0 λ2 | |y|
Shear
One coordinate is left unchanged. (Pulling diagonally)
Combining Linear Transformations
to combine example:
Rotation = R
Shear = S
combined result Z= (R⋅S)x
⋅ = Dot product
Dot Product
|a1 | ⋅ | b1|
|a2 | ⋅ | b2|
a1b1 + a2b2
Affine Transformations
that involve a traslation; they can either be standalone, or combined with a linear transformation.
Z = Mx + t (traslation)
Properties of Affine Transformation
Affine transformations have three properties:
⦁ They map straight lines to straight lines
⦁ They map parallel lines to parallel lines
⦁ They compromise all combinations of scaling, rotations, shears and translations
Combining Affine Transformations
homogenous coordinates
Matrix Multiplication
|a b| x |e f|
|c d| |g h|
|ae+bg af+bh |
|ce+dg cf+dh |
To multiply two matrices, use the dot product of each row of the first matrix to the column of each second
Cross Product