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 = (x
2
– x
1
)(a – b) =
D
x(a – b)
•
d is always integer