Bresenham's Algorithm Demonstration

This simple Java applet illustrates how 2-dimensional lines are represented as discretized pixels on a computer screen. Each small box represents an individual pixel. Simply click once to mark the beginning of the line, and then click a second time to mark the end of the line.

This applet includes the following options:

This applet requires a Java-capable browser.


Download

Take a look at the code.