http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm