Digital differential analyzer (graphics algorithm): Difference between revisions

Content deleted Content added
No edit summary
Line 20:
 
== Algorithm ==
TheA linear DDA starts by calculating the smaller of dy or dx for a unit increment of the other. A line is then sampled at unit intervals in one coordinate and corresponding integer values nearest the line path are determined for the other coordinate.
 
Considering a line with positive slope, if the slope is less than or equal to 1, we sample at unit x intervals (dx=1) and compute successive y values as