COMPARE LINE DRAWING ALGORITHMS BRESENHAM’S LINE DRAWING ALGORITHM :: Fast and Incremental algorithm. It involves only integer calculations in its point computing. It makes use of addition, subtraction and shifting only. DIGITAL DIFFERENTIAL ANALYZER ALGORITHM :: Round-off errors makes the computing pixel to drift away from the ideal line. Time consuming -Floating point arithmetic & rounding off process XIAOLIN WU’S LINE ALGORITHM :: Performs anti-aliasing. Draw pairs of pixels on both side of the computed pixel and are coloured in a way that they look alike. Slower than Bresenham’s Line Drawing algortihm.
BRESENHAM’S LINE DRAWING If(midpoint>ideal line) Next_pixel_to_be_plotted = Next_Lower_pixel; (po<0) Else Next_pixel_to_be_plotted = Next_Upper_pixel; (po>0) po= 2*dy(LOWER PIXEL) (Next Co-ordinates will be (xk+1,yk)).
po= 2*dy – 2*dx (UPPER PIXEL) (Next Co-ordinates will be (xk+1,yk+1)).