Skip to main content

Midpoint circle: r=8, centre (10,10)

Short answer

Use midpoint circle algorithm with p0=-7; including symmetry, first-quadrant points about the origin are (0,8), (1,8), (2,8), (3,7), (4,7), (5,6), (6,5), (7,4), (7,3), (8,2), (8,1), (8,0). Adding center (10,10) gives (10,18), (11,18), (12,18), (13,17), (14,17), (15,16), (16,15), (17,14), (17,13), (18,12), (18,11), (18,10).

Using the midpoint circle drawing algorithm, calculate the coordinates on the first quadrant of a circle having radius 8 and centre (10, 10).

Given: radius r = 8, centre (10,10).

Start at (x0, y0) = (0, 8). Initial parameter p0 = 1 − r = −7.

p < 0 : next point (x+1, y),     p_new = p + 2x_new + 1
p ≥ 0 : next point (x+1, y−1),   p_new = p + 2(x_new − y_new) + 1
Stop when x ≥ y

Decision parameter table (circle centred at the origin; p_k decides the next point):

kp_k(x_k, y_k)next (x, y)
0-7(0,8)(1,8)
1-4(1,8)(2,8)
21(2,8)(3,7)
3-6(3,7)(4,7)
43(4,7)(5,6)
52(5,6)(6,5)

Octant points about the origin: (0,8), (1,8), (2,8), (3,7), (4,7), (5,6).

By symmetry, each point (x,y) also gives (y,x), so the first-quadrant points about the origin, in order along the arc, are:

(0,8), (1,8), (2,8), (3,7), (4,7), (5,6), (6,5), (7,4), (7,3), (8,2), (8,1), (8,0)

Adding the centre (10,10):

Answer (first quadrant): (10,18), (11,18), (12,18), (13,17), (14,17), (15,16), (16,15), (17,14), (17,13), (18,12), (18,11), (18,10).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 2 questions →