Graphics Programs Reference
In-Depth Information
y
4
3
2
1
Rectangle
x
1
2
3
4
5
(a)
(b)
Figure 1.2: Scissors and Shearing.
x = R cos α and y = R sin α . From this, we get the expressions for x and y
x = R cos( α
θ )= R cos α cos θ + R sin α sin θ = x cos θ + y sin θ,
y = R sin( α
θ )=
R cos α sin θ + R sin α cos θ =
x sin θ + y cos θ.
Hence, the clockwise rotation matrix in two dimensions is
cos θ
,
cos θ 0
0 s θ
1
.
which also
equals
the product
sin θ
tan θ
(1.4)
sin θ
cos θ
tan θ
1
This shows that any rotation in two dimensions is a combination of scaling (and, per-
haps, reflection) by a factor of cos θ and shearing, an unexpected result (that's true for
all angles where tan θ is finite).
P
P *
θ
φ
α
x *
x
Figure 1.3: Clockwise Rotation.
Exercise 1.6: Show how a 45 rotation can be achieved by scaling followed by shearing.
Search WWH ::




Custom Search