The equation of a circle is simple, but a raster display cannot draw infinitely many points. It needs integer pixels and a repeatable way to choose between two candidates. The choice follows from the decision test, the radius-5 circle is generated step by step, and midpoint and Bresenham forms select the same pixels. For the wider subject context, the UGC NET Preparation Courses & Test Series category places Computer Graphics alongside the rest of the syllabus.
A raster circle is a discrete approximation to an implicit curve
For a circle of radius r centred at the origin, define F(x,y) = x^2 + y^2 - r^2. A negative value is inside the ideal circle, zero is on it, and a positive value is outside. For centre (x_c,y_c), translate the test to F(X,Y) = (X-x_c)^2 + (Y-y_c)^2 - r^2.
The continuous curve has infinitely many points. Rasterisation selects nearby integer pixel centres. With r=5, (3,4) is exactly on the curve because 3^2+4^2=25. Point (2,5) gives F=4, so it is outside, but it is closer than (2,4), where F=-5.
Work in the first octant. Start at (0,r), increase x by one, and choose E=(x+1,y) or SE=(x+1,y-1) until x>y. Circle symmetry then supplies the rest. This setup is different from line drawing, which organises candidate moves by slope region.
Eight-way symmetry turns one octant into the full circle
From relative point (x,y), plot these translated pixels:
(x_c+x,y_c+y), (x_c-x,y_c+y), (x_c+x,y_c-y), (x_c-x,y_c-y), (x_c+y,y_c+x), (x_c-y,y_c+x), (x_c+y,y_c-x), (x_c-y,y_c-x).
For centre C=(10,7) and relative point (3,4), they are (13,11), (7,11), (13,3), (7,3), (14,10), (6,10), (14,4), and (6,4). For example, (13-10)^2+(11-7)^2=9+16=25. The same invariant holds for all eight.
A generic point with 0<x<y produces eight distinct pixels. An axis point such as (0,5) produces four, and a diagonal point with x=y also produces four. Code can emit all eight and deduplicate, or guard these special cases while plotting.

The midpoint decision parameter removes repeated square roots
The midpoint between E and SE is M_k=(x_k+1,y_k-1/2). If F(M_k)<0, the midpoint is inside, so choose E. Otherwise choose SE. The tie rule is p_k>=0, so ties choose SE.
The integer midpoint form starts with x_0=0, y_0=r, and p_0=1-r. Use current coordinates before moving:
If
p_k<0, take(x_{k+1},y_{k+1})=(x_k+1,y_k)and setp_{k+1}=p_k+2x_k+3.Otherwise, take
(x_k+1,y_k-1)and setp_{k+1}=p_k+2(x_k-y_k)+5.
The exact first midpoint evaluation is F(1,r-1/2)=5/4-r. The standard integer initial value and incremental recurrences avoid repeated sqrt, sin, or cos evaluation.
Worked midpoint circle for centre (0,0) and radius 5
Set r=5, so p_0=1-5=-4. Plot each current point while x<=y, then update.
k | Current |
| Choice | Next point |
|
|---|---|---|---|---|---|
0 |
| -4 | E |
|
|
1 |
| -1 | E |
|
|
2 |
| 4 | SE |
|
|
3 |
| 3 | SE |
|
|
The point (3,4) is plotted. The next candidate (4,3) has x>y, so it is not a new first-octant sample. Symmetry from (3,4) already supplies it. The unique first-octant list is (0,5), (1,5), (2,5), (3,4).
Point (0,5) contributes four unique axis pixels. Each of the other three contributes eight, so the full raster circle has 4+8+8+8=28 unique pixels. That is a pixel count, not the continuous circumference 2*pi*r.

Bresenham's circle form uses different integers for the same decision
A common Bresenham form starts with d_0=3-2r. Choose E when d_k<0, using d_{k+1}=d_k+4x_k+6. Otherwise choose SE, using d_{k+1}=d_k+4(x_k-y_k)+10. Again, the coordinates are the current values before the move.
For r=5, d_0=3-10=-7. The updates give -7 -> -1 -> 9 -> 7 -> 13, paired with E, E, SE, SE. At the four plotted points, d_k=2p_k+1: 2(-4)+1=-7, 2(-1)+1=-1, 2(4)+1=9, and 2(3)+1=7.
The scaled and shifted decision variables therefore choose the same pixels. Textbooks may use a different initial constant or update x before writing the recurrence. Never combine the initialisation from one convention with updates from another.
Direct, polar and incremental methods solve different subproblems
Method | Sample rule | Per-step arithmetic | Main caution |
|---|---|---|---|
Direct |
| Square, subtract, square root | Sampling direction and rounding affect coverage |
Polar |
| Trigonometric evaluation | Angle step can create gaps or duplicates |
Midpoint or Bresenham | Choose | Additions and integer comparisons | Keep one recurrence convention |
For r=5, direct evaluation gives round(sqrt(21))=5 at x=2 and round(sqrt(16))=4 at x=3. Direct and polar methods remain useful for derivations, arbitrary angular samples, and floating-point geometry APIs. The incremental method gives a connected, symmetry-friendly trace with an explicit next-pixel rule.
Bounds still matter. With centre (10,7), radius 5, and canvas limits 0<=X<=15, 0<=Y<=11, axis pixel (10,12) must be clipped. Pixels (10,2), (15,7), and (5,7) are valid. Writing outside the buffer is an implementation error, not a circle decision error.
Common traps in circle drawing questions
Do not test the current pixel when the rule asks for the midpoint. Write M_k, the sign rule, and the coordinate convention before starting. For this trace, the checkpoints at plotted points are p: -4,-1,4,3 and d: -7,-1,9,7.
Do not stop after four reflections. Include the (y,x) swap, translate every coordinate by the centre, and remove axis or diagonal duplicates. The centre (10,7) example gives a quick check: every translated point must satisfy (X-10)^2+(Y-7)^2=25.
Stable practice tasks include finding the next pixel, completing an octant trace, reflecting a point about a shifted centre, spotting a mismatched recurrence, and counting distinct pixels. Use UGC NET Computer Science Syllabus Areas and Course Map to place raster graphics in the full syllabus. Then use UGC NET Computer Science High-Yield Topics, Ranked to decide when this topic should enter revision.
The short version and the next useful step
Compute one octant, reflect it eight ways, let the midpoint sign choose E or SE, and keep one convention from initialisation through termination. For r=5, the octant points are (0,5), (1,5), (2,5), (3,4), which generate 28 unique full-circle pixels.
Now rerun the table for r=4. Your check is p_0=-3, with plotted points (0,4), (1,4), (2,3), (3,3) and current values -3, 0, -1, 6. Updating from (3,3) gives (4,2), so stop because x>y.
For an exam-aligned Computer Graphics unit, continue with NTA-UGC-NET Paper 2. For a broader CS learning path, consider ZERO TO HERO. Both are optional next steps after you can reproduce the trace without mixing conventions.




