Graphics Reference
In-Depth Information
As a special example, the matrix
I
, with ones on the diagonal and zeroes off
the diagonal, is called the
identity matrix;
the associated transformation
T
(
x
)=
Ix
(10.9)
is special: It's the identity transformation that leaves every vector
x
unchanged.
Inline Exercise 10.7:
There is an identity matrix of every size: a 1
×
1 identity,
a2
×
2 identity, etc. Write out the first three.
2 matrices, then they define transformations
T
M
and
T
K
. When
we compose these, we get the transformation
×
T
K
:
R
2
R
2
:
x
T
M
◦
→
→
T
M
(
T
K
(
x
)) =
T
M
(
Kx
)
(10.10)
=
M
(
Kx
)
(10.11)
=(
MK
)
x
(10.12)
=
T
MK
(
x
)
.
(10.13)
In other words, the composed transformation is also a matrix transformation,
with matrix
MK
. Note that when we write
T
M
(
T
K
(
x
))
, the transformation
T
K
is
applied
first.
So, for example, if we look at the transformation
T
2
◦
T
3
, it first shears
the house and
then
scales the result nonuniformly.
Inline Exercise 10.8:
Describe the appearance of the house after transforming
it by
T
1
◦
T
2
and after transforming it by
T
2
◦
T
1
.
Amatrix
M
is
invertible
if there's a matrix
B
with the property that
BM
=
MB
=
I
. If such a matrix exists, it's denoted
M
−
1
.
If
M
is invertible and
S
(
x
)=
M
−
1
x
, then
S
is the inverse function of
T
M
,
that is,
S
(
T
M
(
x
)) =
x
and
(10.14)
T
M
(
S
(
x
)) =
x
.
(10.15)
Inline Exercise 10.9:
Using Equation 10.13, explain why Equation 10.15
holds.
If
M
is not invertible, then
T
M
has no inverse.
Let's look at our examples. The matrix for
T
1
has an inverse: Simply replace
30 by
30 in all the entries. The resultant transformation rotates clockwise by 30
◦
;
performing one rotation and then the other effectively does nothing (i.e., it is the
identity transformation). The inverse for the matrix for
T
2
is diagonal, with entries
−