lineDDA( ) 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 lineDDA() method described in the previous slide.
An ideal line is then overlaid for comparison.
|
The lineDDA() method:
You should not see any difference in the lines generated by this method
and the lineImproved( ) method mentioned previously.
|