3 - linear transformations Flashcards
(30 cards)
applying a matrix - a b c d to (x y)
a b
c d
->
ax+by
cx+ dy
determining a matrix for a transformation
look at the unit vectors
(1,
0) - i
(0
1) - j
find how they change and what they change to and this is the new matrix
rotate theta degrees
cosθ - sinθ
sinθ cosθ
rotate 90
0 -1
1 0
rotate 180
-1 0
0 -1
rotate 270
0 1
-1 0
reflection in x axis
1 0
0 -1
reflection in y axis
-1 0
0 1
reflection in the line y = x
0 1
1 0
reflection in the line y = - x
0 -1
-1 0
enlargement by scale factor k
k 0
0 k
shear x axis invariant
(1 k
0 1
shear y axis invariant
1 0
k 1
stretch by a in x direction and b in y direction
a 0
0 b
det (rotation matrix)
1
det ( reflection matrix)
-1
det(engagement matrix)
k²
how det affects area
area of an image after transformation = det(M) * object
combined transformations
to do A then B
we do B(A(x)) = BA x
inverse matrices to inverse transformation
if x and y are column vectors
if Ax = y
x = A-1 y
3*3 rotation about x axis
1 0 0
0 cosθ -sinθ
0 sinθ cosθ
3*3 rotation about y axis
cosθ 0 sinθ
0 1 0
-sinθ 0 cosθ
3*3 rotation about z axis
cosθ -sinθ 0
sinθ cosθ 0
0 0 1
reflect in x/y/z = 0
1 0 0
0 1 0
0 0 1
(whichever line it is that one is -1 eg for x = 0 the first 1 becomes -1)