What is Mid Point Circle Drawing algorithm?
A circle can be formed by plotting a set of points or coordinates on the screen which is completely dependent on the radius of that circle, despite calculating intermediate points as in case of a line segment which actually dependent upon the previous point.
1) It is an eight symmetry figure.
2) Coordinates or points are calculated using Pythagorean theorem (x-x_centre)2+(y-y_centre)2=r2
3) Decision parameter decides on which basis further calculations would be made
if d<0 , (x,y ) inside the circle
if d=0,(x,y) is on the boundary of the circle
if d>,(x,y) outside the circle
However, Bresenham algorithm came up from Mid Point algorithm.
1. Get radius and coordinates from the user.
2.Find out the decision parameter that decides the nearest point to select using
3.While Y is greater than X do
4. if d is smaller than 0, then
4. Determine and plot the symmetry points for all eight octants.
5. Repeat step 3 and 4, till y>x
C program to draw a circle using Circle Drawing Algorithm
printf("*********** MID POINT Circle drawing algorithm ********\n\n");
printf("\nenter the coordinates= ");
printf("\n now enter the radius =");
You must be logged in to take the quiz.