Graphics Reference
In-Depth Information
Fig. 10.1
The point
P
is
translated by
(t
x
,t
y
,t
z
)
with a
fixed frame
10.3 Matrix Transforms
In general, if points in the frame
X
Y
Z
are related to points in the frame
XYZ
by
the transform
A
using
A
P
,
then a point
P
in
XYZ
has coordinates in
X
Y
Z
using
P
=
P
=
A
−
1
P.
In computer graphics most frame of reference transforms involve a translation or
a rotation, or a combination of both. We now explore these different scenarios and
develop transforms for converting coordinates in the original frame of reference to
another frame.
10.3.1 Translated Frames of Reference
Figure
10.1
shows a point
P
translated by
(t
x
,t
y
,t
z
)
to
P
using the transform
T
t
x
,t
y
,t
z
⎡
⎣
⎤
⎦
100
t
x
010
t
y
001
t
z
000 1
T
t
x
,t
y
,t
z
=
where the translated point
P
is given by
P
=
T
t
x
,t
y
,t
z
P.
Thus the coordinates of
P
are updated relative to the fixed frame of reference
XYZ
.
However, there is a second interpretation for
T
t
x
,t
y
,t
z
, where
P
remains fixed and
the frame of reference
XYZ
is translated by
(
−
t
x
,
−
t
y
,
−
t
z
)
, as shown in Fig.
10.2
.
Consequently, the point
P(x,y,z)
in
XYZ
has coordinates
P
(x
,y
,z
)
in
X
Y
Z
given by
P
=
T
−
1
−
t
z
P.
t
x
,
−
t
y
,
−