lineSimple( ) Demonstration
Draw a line by clicking and dragging on
the pixel grid shown with the left mouse button. An ideal line is displayed
until the left button is released. Upon release a discrete approximation of the line
is drawn on the display grid using the lineSimple() method described in the previous slide.
An ideal line is then overlaid for comparison.
|
The lineSimple() method:
Does it work?
Try various slopes.
|