



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The notation and methods for handling matrix transformations, including rotation, scaling, and translation. It covers the commutativity of uniform scaling and rotation, as well as the application of these transformations to reflect lines and check for collinearity.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Assume the following notation: R means rotation counterclo ckwise with angle , Ti means translation to the lo cation (xi ; yi ), Ti+j means translation to the lo cation of (xi + xj ; yi + yj ), T(x;y ) means translation to the lo cation (x; y ), Sc means uniform scaling with factor c, and S(c 1 ;c 2 ) means that non-uniform scaling with c in the x direction, and c 2 in the y direction. This notation will b e used through out the homework.
φ (^) φ+θ−(π/2)
θ
x’
y’ x"
y"
Figure 1: Problem 1 Outline
x = x^0 + x^00 = a 1 cos + a 2 sin( + 2
= a 1 cos a 2 cos( + ) (1) y = y 0 y 00 = a 1 sin a 2 cos( +
2
= a 1 sin a 2 sin( + ) (2)
The previous metho d is straightforward, but as this is a graphics course, it is b etter to solve using transformations. It is a transformation of the origin to the p oint P.
P = R T(a 1 ;0) R T( a 2 ;0) O^
2 6 4
a 1 cos a 2 cos ( + ) a 1 sin a 2 sin( + ) 1
3 7 5
R Sa =
2 6 4
cos sin 0 sin cos 0 0 0 1
3 7 5
2 6 4
a 0 0 0 a 0 0 0 1
3 7 5
2 6 4
a cos a sin 0 a sin a cos 0 0 0 1
3 7 5 (3)
Sa R =
2 (^64)
a 0 0 0 a 0 0 0 1
3 (^75)
2 (^64)
cos sin 0 sin cos 0 0 0 1
3 (^75)
2 (^64)
a cos a sin 0 a sin a cos 0 0 0 1
3 (^75) (4)
From equation 3 and equation 4, we reach R Sa = Sa R. Thus, uniform scaling, and rotation are commutative. (b) Now consider two rotations around and resp ectively,
2 6 4
cos sin 0 sin cos 0 0 0 1
3 7 5
2 6 4
cos sin 0 sin cos 0 0 0 1
3 7 5
2 (^64)
cos cos sin sin (sin sin cos cos ) 0 sin cos sin sin cos cos sin sin 0 0 0 1
3 (^75)
2 (^64)
cos ( + ) sin( + ) 0 sin( + ) cos( + ) 0 0 0 1
3 (^75)
Since addition is commutative =) R(+ ) = R( +).
R R = R R (6)
T(x;y ) R =
2 6 4
cos sin x sin cos y 0 0 1
3 7 5 (9)
Now let's represent a translation followed by a rotation:
R T(x;y ) =
2 6 4
cos sin x cos y sin sin cos x sin + y cos 0 0 1
3 7 5 (10)
From equations 9 and 10, RT can b e represented by by a rotation followed by translation where
R T(x;y ) = T(x^0 ;y 0 ) R
2 6 4
1 0 x cos y sin 0 1 x sin + y cos 0 0 1
3 7 5
2 6 4
cos sin 0 sin cos 0 0 0 1
3 7 5
2 (^64)
1 0 x^0 0 1 y 0 0 0 1
3 (^75)
2 (^64)
cos sin 0 sin cos 0 0 0 1
3 (^75) (11)
where x^0 = x cos y sin , and y 0 = x sin + y cos . Also, recall from problem # 2 that a sequence of rotations can b e replaced by a single rotation, and also, a sequence of translations can b e replaced by a single translation. Note that in the following, T and R represent abstract translation, and abstract rotation, resp ectively. So assume that there is a general sequence S 1 ; S 2 ; : : : ; Sn , where each Si can b e either a R or a T. We want to prove that M = Sn Sn 1 : : : S 1 = T R. The pro of will b e done by induction. At t = 0, M = I , where I is the identity matrix. M = I = T R where the rotation is by angle 0, and the translation to the origin (0; 0). At t = 1, M = S 1 Mold = S 1 T R, if S 1 = T =) M = T T R = T R due to equation 7. Else, if S 1 = R =) M = RT R = T 0 RR = T R due to equation 11. Assume pro of is held for t = n, i.e.; M = Sn Sn 1 : : : S 1 = T R, then at t = n + 1, If Sn+1 = T =) M = T T R = T R, and similarly, if S 1 = R =) M = RT R = T 0 RR = T R due to equation 11. So, it holds for t = n + 1.
Thus, any sequence of rotations, and translations can b e represented by a rota- tion followed by a translation.