Algorithms for Basic Line Segment Plotting
There are two important algorithms for basic line segment plotting-DDA algorithm and Bresenham algorithm. Both the algorithms use the form y = mx + c of the line segment.
Whereas DDA uses floating point calculations to determine iteratively the pixel positions, Bresenham algorithm is based purely on integer calculation. Therefore, Bresenham algorithm is more efficient and faster.
However, in the literature, you may find modified DDA algorithm that uses integer calculation only.