Skip to main content

Midpoint circle: r=6, centre (20,10)

Short answer

Using midpoint circle algorithm with r=6 and center (20,10), the first-quadrant points are (20,16), (21,16), (22,16), (23,15), (24,14), (25,13), (26,12), (26,11), (26,10).

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

Given: radius r = 6, centre (20,10).

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

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-5(0,6)(1,6)
1-2(1,6)(2,6)
23(2,6)(3,5)
30(3,5)(4,4)
41(4,4)(5,3)

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

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,6), (1,6), (2,6), (3,5), (4,4), (5,3), (6,2), (6,1), (6,0)

Adding the centre (20,10):

Answer (first quadrant): (20,16), (21,16), (22,16), (23,15), (24,14), (25,13), (26,12), (26,11), (26,10).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 2 questions →