Graphics Reference
In-Depth Information
Figure 7.12.
Basic cases to watch for
in scan line algorithms.
for iy := MINY to MAXY do
begin
intersect plane y = iy with objects to get segments;
for ix := MINX to MAXX do
show point (ix,iy) in segments, if any, which are
closest to viewer;
end ;
Of course one had to make this practical using “coherence.” We made incremental
computations and had “active edge lists.” Figure 7.12 shows the basic cases for which
we had to watch out as we moved from scan line to scan line. We did various sorts
to speed things up.
As we pass to curved surfaces we need to handle new cases. Assume that the
surface is parameterized by a function
(
) =
(
(
)
(
)
(
)
)
fuv
,
Xuv Yuv Zuv
,
,
,
,
,
.
We need to look at level curves. Again assuming an orthogonal projection with the y-
axis corresponding to scan lines, these level curves are defined by equations
(
) =
Yuv
,
c
.
In the linear case all the geometric information was contained in the edges and these
could be represented by their endpoints. Now this is not enough because of “silhou-
ettes.” A silhouette is formed by points where the normal to the surface is orthogonal
to the z-axis (or line of sight for a nonorthogonal view).
Let us keep track of points on level curves that are endpoints on patches or sil-
houettes. We shall do this by keeping track of their parameter values (u,v) and update
them as we move down the scan lines. This is an important point, namely, that
Search WWH ::




Custom Search