Bresenham algorithm for a line

$$$APPLET

Bresenham algorithm for a line  interactivity: select starting point of a line and moving  with mouse transfer ending points.

Bresenham algorithm for a line[4]