Line Drawing, Leap Years and Euclid. - Harris, Mitchell; Reingold, Edward M.
Bresenham's algorithm minimizes error in drawing lines on integer grid points; leap year calculations, surprisingly, are a generalization. We compare the two calculations, explicate the pattern, and discuss the connection of the leap year/line pattern with integer division and Euclid's algorithm for computing the greatest common divisor.
Keywords: Bresenham's algorithm; Euclid's algorithm; Calendar algorithms; Continued fractions; Greatest common divisor; Leap years; Line drawing; Scan line conversion