Today I learned that the C64 does not have a Bresenham algorithm in the firmware, since apparently the Commodore version of The MAD Computer Program includes its own Bresenham implementation in BASIC.
Atari didn’t either. I remember seeing bresenham implemented in Atari BASIC and it outperformed the built in BASIC command DRAWTO significantly without assembly support.
Seems like something Apple/Woz would do but I cannot confirm. Or deny.
The Applesoft routine isn't quite the same as the standard Bresenham algorithm, because it doesn't move diagonally. Consider a line from (0,0) to (50,10) -- gently sloping down and to the right. The standard algorithm would plot exactly 51 pixels, one in each horizontal position. The "pen" always moves one pixel right, but sometimes also moves down.
In Applesoft, the "pen" can move either right or down, but can't do both at once. This results in lines that feel thin when near horizontal or vertical, but become thicker as they approach 45 degrees. This reduces performance, because Applesoft draws twice as many pixels for a diagonal line as the basic algorithm. It can also be visually jarring when animated, because lines get very thick when near diagonal.
Seems like something Apple/Woz would do but I cannot confirm. Or deny.
quote below from the Lines section ---
The Applesoft routine isn't quite the same as the standard Bresenham algorithm, because it doesn't move diagonally. Consider a line from (0,0) to (50,10) -- gently sloping down and to the right. The standard algorithm would plot exactly 51 pixels, one in each horizontal position. The "pen" always moves one pixel right, but sometimes also moves down.
In Applesoft, the "pen" can move either right or down, but can't do both at once. This results in lines that feel thin when near horizontal or vertical, but become thicker as they approach 45 degrees. This reduces performance, because Applesoft draws twice as many pixels for a diagonal line as the basic algorithm. It can also be visually jarring when animated, because lines get very thick when near diagonal.