<P> Just as with Bresenham's line algorithm, this algorithm can be optimized for integer - based math . Because of symmetry, if an algorithm can be found that only computes the pixels for one octant, the pixels can be reflected to get the whole circle . </P> <P> We start by defining the radius error as the difference between the exact representation of the circle and the center point of each pixel (or any other arbitrary mathematical point on the pixel, so long as it's consistent across all pixels). For any pixel with a center at (x i, y i) (\ displaystyle (x_ (i), y_ (i))), the radius error is defined as: </P> <Dl> <Dd> R E (x i, y i) = x i 2 + y i 2 − r 2 (\ displaystyle RE (x_ (i), y_ (i)) = \ left \ vert x_ (i) ^ (2) + y_ (i) ^ (2) - r ^ (2) \ right \ vert) </Dd> </Dl> <Dd> R E (x i, y i) = x i 2 + y i 2 − r 2 (\ displaystyle RE (x_ (i), y_ (i)) = \ left \ vert x_ (i) ^ (2) + y_ (i) ^ (2) - r ^ (2) \ right \ vert) </Dd>

Compare between circle generation algorithm and midpoint circle algorithm