
2.2 Transformations 37
= P
0
+
w
1
s
w
0
+ (w
1
− w
0
)s
(P
1
− P
0
)
= P
0
+¯s(P
1
− P
0
)
where the last equality defines
¯s =
w
1
s
w
0
+ (w
1
− w
0
)s
(2.43)
a quantity that is also in the interval [0, 1]. We have obtained a parametric equation
for a 2D line segment with endpoints P
0
and P
1
, so in fact line segments are projected
to line segments, or if P
0
= P
1
, the projected segment is a single point. The inverse
mapping from ¯s to s is actually important for perspectively correct rasterization, as
we will see later:
s =
w
0
¯s
w
1
+ (w
0
− w
1
)¯s
(2.44)
Exercise
2.7
Construct Equation (2.44) from Equation (2.43).
Equation (2.43) has more to say about perspective projection. Assuming w
1
>w
0
,
a unifor ...