Algorithm 1 Bresenham - Straight Line Draw a line segment from (x_{0}, y_{0}) to (x_{1}, y_{1}), two points with integer coordinates. Ensure: x_{0}, y_{0}, x_{1}, y_{1} ∈ ℤ, x_{0} < x_{1}, 0 ≤ y_{1} − y_{0} ≤ x_{1} − x_{0}. 1: x ← x_{0} 2: y ← y_{0} 3: a ← x_{1} − x_{0} 4: b ← y_{1} − y_{0} {0 ≤ b ≤ a} 5: output(x, y) 6: d ← 0 {d = a(y − y_{0}) − b(x − x_{0})} 7: while x ≤ x_{1} do 8: x ← x + 1 9: d ← d − b 10: if 2 ∗ d < a then 11: y ← y + 1 12: d ← d + a 13: end if 14: output(x, y) 15: end while Algorithm 2 Bresenham - Circle Draw first quadrant of circle x^{2} + y^{2} = r^{2}, 0 ≤ x ≤ r, y ≥ 0. Ensure: r ∈ ℤ, r ≥ 1. 1: x ← r 2: y ← 0 3: d ← 0 {d = x^{2} + y^{2} − r^{2}} 4: output8(x, y) 5: while x < y do 6: output(x, y) 7: x ← x + 1 8: d ← d + 2 ∗ x + 1 9: if d > y then 10: y ← y − 1 11: d ← d − 2 ∗ y + 1 12: end if 13: end while