03/13/2003
15-462 Graphics I
6
Bresenham’s Algorithm II
•Decision variable a – b
–If a – b > 0 choose lower pixel
–If a – b · 0 choose higher pixel
•Goal: avoid explicit computation of a – b
•Step 1: re-scale d = (x2 – x1)(a – b) = Dx(a – b)
•d is always integer