2.2 Scan Converting Lines
Cf. [FvDFH90, 3.2],
[PK87, 3.3], and
almond.srv.cs.cmu.edu/.../scanconv_2.pdf.
A line from point
to point
is mathematically given in explicit form by
When we draw the line on the screen, we have to pick points with integer coordinates
as close as possible to the line.
If the slope satisfies
, then we should pick in
any column with given integer value
one point as close as possible to the corresponding point on the line.
Its
-coordinate is given by
.
If the slope satisfies
we may exchange
and
, in order
to reduce the problem to the particular
case.
This method by brute force is inefficient because of the multiplication and the function
.
Subsections
Andreas Kriegl 2003-07-23