Another look at Bresenham
from a more mathematical point of view...
...from computer code optimisation to geometry
main equations
(1) y = m x + b = DY/DX * x + b
y0 = m x0 + b
y1 = m x1 + b
(2) m = (y1 - y0)/(x1 - x0) = DY/DX
b = y0 - m x0
working hypothesis
(3) Let's consider for the demonstration that 0 <= m <= 1 and x0 <
x1
<=> from one given step of the algo, we only have to chose between 2
pixels for the next step.
(and DX > 0)
which of two possible pixel positions is closer to the line path at each sample
step