Bresenham line algorithm and Scan Line Algorithm