Drag the two points around
This uses the Bresenham's line drawing algorithm. It is used in many computers for drawing lines on the screen. I learned it here: http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm