Assignment Midpoint Circle Drawing Algorithm
Assignment Midpoint Circle Drawing Algorithm
Submitted To
Name: Professor Dr. Md. Ismail Jabiullah
Professor
Department of Computer Science and Engineering
Submitted By
Name: Md. Monjur Hasan Milton
ID: 171-15-9220
Section:O-7
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Content List
Title Midpoint Circle Drawing Algorithm
Introduction Page #3
Description Page #3
Description Page #4
Description Page #5
Description Page #6
algorithm
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Intorduction:
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Description:
Given-
Step-01:
X0 = 0
Y0 = R
Step-02:
P0 = 1 – R
Step-03:
Suppose the current point is (Xk, Yk) and the next point is (Xk+1, Yk+1).
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
If Step-04:
The given centre point (X0, Y0) is not (0, 0), then do the following and
plot the point-
Xplot = Xc + X0
Yplot = Yc + Y0
Here, (Xc, Yc) denotes the current value of X and Y coordinates.
Step-05:
Step-06:
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
To find the points for other seven octants, follow the eight
symmetry property of circle.
Given the centre point coordinates (0, 0) and radius as 10, generate all
the points to form a circle.
Solution-
Given-
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Centre Coordinates of Circle (X0, Y0) = (0, 0)
Radius of Circle = 10
Step-01:
X0 = 0
Y0 = R = 10
Step-02:
P0 = 1 – R
P0 = 1 – 10
P0 = -9
Step-03:
Thus,
Xk+1 = Xk + 1 = 0 + 1 = 1
Yk+1 = Yk = 10
Pk+1 = Pk + 2 x Xk+1 + 1 = -9 + (2 x 1) + 1 = -6
Step-04:
This step is not applicable here as the given centre point coordinates is
(0, 0).
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Step-05:
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Now, the points for rest of the part are generated by following the signs
of other quadrants.
Here, all the points have been generated with respect to quadrant-1-
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
Merits of Mid Point Circle Drawing Algorithm
10
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
It is a powerful and efficient algorithm.
The entire algorithm is based on the simple equation of circle X2 +
Y2 = R2.
It is easy to implement from the programmer’s perspective.
This algorithm is used to generate curves on raster displays.
Conclusion:
11
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ
12
References: https://www.gatevidyalay.com/mid-point-circle-drawing-
algorithm/?fbclid=IwAR10ED6XaxGhFXfSKO6xjja7uE3jZWq_eInA5nhinQtCmzHssAFaIK_JAlQ