Line Rasterization and Grid Traversal

Click on grid to plot lines using one of the following algorithms:

Cursor coordinate:

Algorithm:

Source code: [ demo.js ] [ bresenham.js ] [ exact.js ] [ amanatides_woo.js ]