Recently, I attempted to visualize the Bresenham’s line algorithm for a student of mine. See the Octave published code.

Grab the source code from within Octave:

grabcode ("https://siko1056.github.io/src/octave/html/brasenham.html")


or find here.