Gaps occur when m > 1.

The figure on the left of this slide shows the results of the DDA method when the slope of the line is greater than 1. Notice the gaps in the line, which arise because a step of 1 in x corresponds to a step in y of more than one pixel. The solution in this case, shown in the figure on the right, is to reverse the roles of x and y, using a unit step in y, with a corresponding step of 1/m for x. In this slide, the slope of the line is 2. To avoid gaps, we determine each pixel location by adding 1 to y and 1/2 to x.

Back

Quit