Line Drawing Algorithm (Digital Differential Analyser (
Line Drawing Algorithm (Digital Differential Analyser (
(DIGITAL DIFFERENTIAL
ANALYSER (DDA))
CONCEPT OF LINE ALGORITHM.
• Digital differential analyse is hardware or software used for interpolation of variable over and
interval between start and end points .
• Is an incremental scan conversion method.
• The DDA uses linear interpolation to calculate the coordinates of points lying between two end
point.
• It relies on incremental calculations to generate lines and is computational efficient .
• Used for rasterization of lines ,triengles and polygons they can be extended to non linear functions.
WORKING PRINCIPLE OF DIGITAL DIFFERENTIAL (DDA))
• The DDA calculates the increaments of x and y coordinates between two end point.
• It coordinates increamental these coordinates during the line drawing process to generate the
intermediate points.
• Get the inputs to the two end points of line (i.e intial and end points)
• Calculate the different between two end points . (dx=X1-X0 and dy=YI-Y0)
• Based on the calculated different in step 2 ,you need to identify the numer more steps in x coordinates
otherwise in y coordinate .
• NB DDA algorithm depends on value of slope m.
ADVANTAGE AND DIS ADVANTAGE DIGITAL
DIFFERTIAL ANLYSER (DDA))
• Ad ; its afaster method than method of using direct use of line
• Ad ; its allows us to detect the change detect the change in the of x and y so plotting of
same point twice .
• Its is an easy method because each steps involves just two addition.
• Dis; results lines are not smooth because of around of () function
• Dis ; the points generated by this algorithm are not accurate .
• There is an extra over head of using round of ()function.
LIMITATION OF DDA
• Rendering operation and floting points arithmetics are still time consuming .
• The algorithm can still be improved .
• Other algorithm , whit better performance also exit.