Midpoint circle algorithm

Rasterizing a circle of radius 23 with the Bresenham midpoint circle algorithm. Only the green   octant is actually calculated, it is simply mirrored seven times to form the other seven octants.
A circle of radius 23 drawn by the Bresenham algorithm

In computer graphics, the midpoint circle algorithm is an algorithm used to determine the points needed for rasterizing a circle. It is a generalization of Bresenham's line algorithm. The algorithm can be further generalized to conic sections.