0
20kviews
Write the mid-point Circle drawing algorithm. Using mid-point circle algorithm plot the circle whose radius = 10 units.
1 Answer
1
2.6kviews

Mid-Point Circle drawing algorithm :

1. Read the radius (r) of the circle.

2. Initialize starting position as 
     x =  0     y = r .

3. Calculate initial value or decision parameter as 
             P = 1.25 – r. 
4. do 
   {
      plot (x, y) 
      if (d  <  0) 
      {
         x = x + 1 
         y = y 
         d = d + 2x + 1 
     else 
     {    
         x = x + 1 
         y = y -  1 
        d  = d + 2x + 2y + 1 
      }
       while(x < y) 

5. Determine symmetry points.

6. Stop.

Given :-

Radius( r ) = 10 units, x = 0 , y = r .

Initial Value of decision parameter P = 1.25 – r = 1.25 – 10 = - 8.75 .

enter image description here

Please log in to add an answer.