
i
i
i
i
i
i
i
i
124 6. A Pocket 3D Theory Reference
surface shading effects. It is these shading effects which enhance the realism
of any computer generated image.
6.3 The Line
There are two useful ways to express the equation of a line in vector form (see
Figure 6.5). For a line passing through a point P
0
and having a direction
ˆ
d,
any point p which lies on the line is given by
p = P
0
+
ˆ
d,
where P
0
is a position vector and
ˆ
d is a unit length (normalized)direction
vector.
Alternatively, any point p on a line passing through two points P
0
and P
1
is given by
p = P
0
+ (P
1
− P
0
).
Using two points to express an equation for the line is useful when we
need to consider a finite ...