This document explains in full detail the midpoint circle method, with particular attention to the origin of the decision variable and the manner in which its change is obtained at each step.
When a circle is to be drawn on a rectangular grid of discrete points, direct use of the equation
is inefficient, since it requires repeated squaring and comparison. Early computing devices and plotting machines were not suited to such operations. A method was therefore sought which would permit the tracing of a circular arc by means of addition alone.
The midpoint circle method fulfills this requirement by maintaining a running error value which measures the deviation of the plotted points from the true curve.
Let a circle of radius r be centered at the origin. Its equation may be written as:
For any point (x, y):
If f(x, y) < 0, the point lies inside the circle.
If f(x, y) = 0, the point lies on the circle.
If f(x, y) > 0, the point lies outside the circle.
Only the sign of f is required for decision making.
Because the circle is symmetric in eight directions, it is sufficient to compute points only in the region:
All remaining points are obtained by reflection.
The tracing begins at the top of the circle:
This point lies exactly on the circumference.
From a point (x, y), only two forward steps are permitted:
At each step, one of these two must be chosen.
Between the East and South-East candidates lies the midpoint:
If this midpoint lies inside the circle, then the East point is closer to the true curve. If it lies outside, the South-East point is closer.
We therefore evaluate:
Let:
Multiply by 4:
The value of D is updated incrementally instead of being recomputed.
The variable D represents the signed distance between the true circle and the midpoint.
If D < 0, choose East.
If D ≥ 0, choose South-East.
The midpoint circle method transforms the continuous equation of a circle into a discrete stepwise construction by maintaining a single error variable. The change in this variable is obtained directly from algebraic expansion. This permits accurate plotting using only integer arithmetic and is well suited to early computational machinery.