Chat with our AI personalities
What is the advantage of bresenham algorithm over dda algorithm?Read more: What_is_the_advantage_of_bresenham_algorithm_over_dda_algorithm
"Simple DDA" does not require special skills for implementation.
These two algorithms are almost completely different. The only real similarity is that they are each designed to use only integer addition/subtraction and multiplication, avoiding expensive division and floating point operations.
1.It drift away from the actual line path because of rounding off float values to integer2.It causes jaggies or stair-step effect----------------------------------------------------------------------------------------------------------------Disadvantage:The accumulation of round of error is successive addition of the floating point increments is used to find the pixel position but it take lot of time to compute the pixel position. ----------------------------------------------------------------------------------------------------------------More Informationhttp://knol.google.com/k/thiyagaraaj-m/dda-line-algorithm/1lfp8o9xxpx13/78# http://i.thiyagaraaj.com/articles/articles/dda-line-algorithm----------------------------------------------------------------------------------------------------------------the standard version of dda given as in one of its steps asif(abs(dx)>abs(dy)) steps=abs(dx);else steps=abs(dy);this part just supports the positive slop with starting point on left side. Take an example of any other end points as {(8,3) to (2,2) or (4,5) to ( 8,2) or (8,3) to (5,5) } where the slop needs to be negative( for the last two cases) only.can anyone correct me by suggesting the accurate version of DDA? Or is this the actual DDA??.
DDA Line Drawing AlgorithmStep 1:[Determine The Dx & Dy]Dx=Xb-XaDy=Yb-YaStep 2:[Determine Slope is Gentle or Sharp]If |Dx|>|Dy| thenGentle SlopeM=Dy/DxSet The Starting PointIf Dx>0 ThenC=CELING(Xb)D=Yb+M*(C-Xb)F=FLOOR(Xa)R=FLOOR(D+0.5)H=R-D+MIF M>0 ThenPositive Gentle SlopeM1=M-1Now Step Through The ColumnsWHILE Cabs(dy)) steps=abs(dx);else steps=abs(dy);xincrement=dx/(float)steps;yincrement=dy/(float)steps;putpixel(round(x),round(y),2)for(k=0;k