
Bresenham's Circle Drawing Algorithm.
Bresenham's circle drawing algorithm is based on 8 way symmetry of circle. It avoids Trigonometric and Square root calculations and hence is fatser then other circle drawing algorithms.
Bresenham's Circle drawing Algorithm
1. Input radius for the Circle.
2. Initialize the decision parameter and make initial point on circumference.
d=3-2*r; x=0; y=r;3. Untill (x<y), Perform the following setps
while(x<y) { if(d<0) { d=d+4*x+6; x++; } else { d=d+4(x-y)+10; y--; x++; } }4. Plot(X,Y).
5. Determine the symmetry points in other octants.
(cx + x, cy + y); (cx - x, cy + y); (cx + x, cy - y); (cx - x, cy - y); (cx + y, cy + x); (cx - y, cy + x); (cx + y, cy - x); (cx - y, cy - x);