DDA Algorithm

DDA Algorithm

by Abdullah Al Mahmood Yasir -
Number of replies: 1

In DDA algorithm on step-3 the processing was reversed. Why it was reversed and what does it mean by reversed ??

In reply to Abdullah Al Mahmood Yasir

Re: DDA Algorithm

by Mazharul Islam Bhuiyan(171-15-1425) -

In DDA algorithm on step-3 the processing was reversed. Why it was reversed and what does it mean by reversed ??

First of all, we have to understand the term reversed in this case of DDA algorithm and then why it's.

 ->> By the way, reversed means the slope(m) value is negative (- ve).  Thus the incremental process for Xk+1 and Yk+1 also be opposed(negative) instead of positive.   

Hence, the dx=-1 (if the difference of X-coordinates is greater than the difference of Y-coordinates ) or dy =-1 (if the difference of Y-coordinates is greater than the difference of X-coordinates )

->> Why reversed: The process will be reversed only when The Starting point > The Ending Point.

For this reason, the incremental process will goto reversed way to plot considering the ending point as the start and stating point as the End.  In this way, the slope or inverse of slope value(based on the value of Dy or Dx) will be subtracted from ending point(not considered point) to the reverse until it reaches the starting point.


HOPE EVRYTHING IS CLEAR !  THANK YOU!