Graphics Reference
In-Depth Information
With
H
in hand, we'll define a new transformation on the
w
=
1 plane by
S
(
v
)=
H
(
T
M
(
v
)
.
(10.118)
This definition has a serious problem: As you can see from Figure 10.22, some
points in the image of
T
areinthe
w
=
0 plane, on which
H
is not defined so that
S
cannot be defined there. For now, we'll ignore this and simply not apply
S
to any
such points.
Inline Exercise 10.27:
Find all points
v
=
xy
1
T
of the
w
=
1 plane
such that the
w
-coordinate of
T
M
(
v
)
is 0. These are the points on which
S
is
undefined.
y
The transformation
S
, defined by multiplication by the matrix
M
, followed
by homogenization, is called a
projective transformation.
Notice that if we fol-
lowed either a linear or affine transformation with homogenization, the homog-
enization would have no effect. Thus, we have three nested classes of transfor-
mations: linear, affine (which includes linear
and
translation and combinations of
them), and projective (which includes affine
and
transformations like
S
).
x
Figure 10.24: Objects in the
w
=
1
plane before transforma-
tion.
Figure 10.24 shows several objects in the
w
=
1 plane, drawn as seen looking
down the
w
-axis, with the
y
-axis, on which
S
is undefined, shown in pale green.
Figure 10.25 shows these objects after
S
has been applied to them. Evidently,
S
takes lines to lines, mostly: A line segment like the blue one in the figure that
meets the
y
-axis in the segment's interior turns into two rays, but the two rays
both lie in the same line. We say that the line
y
=
0 has been “sent to infinity.” The
red vertical line at
x
=
1 in Figure 10.24 transforms into the red vertical line at
x
=
0 in Figure 10.25. And every ray through the origin in Figure 10.24 turns into
a horizontal line in Figure 10.25. We can say even more: Suppose that
P
1
denotes
radial projection onto the
x
=
1 line in Figure 10.24, while
P
2
denotes horizontal
projection onto the
z
=
0 line in Figure 10.25. Then
y
x
S
(
P
1
(
X
)) =
P
2
(
S
(
X
))
(10.119)
Figure 10.25: The same objects
after transformation by S.
for any point
X
that's not on the
y
-axis. In other words,
S
converts radial projection
into parallel projection. In Chapter 13 we'll see exactly the same trick in 3-space:
We'll convert radial projection toward the eye into parallel projection. This is use-
ful because in parallel projection, it's
really
easy to tell when one object obscures
another by just comparing “depth” values!
y
Let's look at how
S
transforms a
parameterized
line. Consider the line
start-
ing at a point
P
and passing through a point
Q
when
t
=
1,
⎡
⎤
⎡
⎤
1
0
1
2
1
0
x
⎣
⎦
+
t
⎣
⎦
(
t
)=
(10.120)
=
P
+
t
(
Q
−
P
)
,
(10.121)
Figure 10.26: The line
passes
through P at t
=
0
and Q at
t
=
1
; the black points are
equispaced in the interval
0
where
P
=
101
T
and
Q
=
311
T
so that in the
w
=
1 plane, the
line starts at
(
x
,
y
)=(
1, 0
)
when
t
=
0 and goes to the right and slightly upward,
arriving at
(
x
,
y
)=(
3, 1
)
when
t
=
1 (see Figure 10.26).
≤
t
≤
1
.