Bresenham

Click and drag to create the desired line

Pixel Scale(Big numbers could slow the browser drastically):