### Circle Generating Algorithms

After learning how to draw line using certain algorithms , we will proceed to the Circle Drawing algorithms , as it is a frequently used component in the pictures and graphs. Full circle or circular arcs is used in most graphic packages.

Let us first understand the properties of the circle.

## Properties of circles:-

The center-radius form of the circle equation is (* x* –

*)*

*h*^{2}+ (

*–*

*y**)*

*k*^{2}=

*r*^{2}, with the center being at the point (

*) and the radius being “*

*h, k**“. This form of the equation is helpful, since you can easily find the center and the radius.The distance is expressed by the Pythagorean Theorem which is expressed as*

*r*

We can use this equation to calculate the position of points by stepping along the x axis in unit steps from x_{c }-r and x_{c} +r.

Y = y_{c} ± ( r^{2} – (x_{c} – x)^{2 }) ^{1/2}

Also, the problem is that it involves a considerable amount of calculation So, we can reduce this equation where it involves simple addition calculation for half semicircle.

The equation is :-

X = x_{c} + rcosα

Y = y_{c} + rsinα

The r and α are polar coordinates.

**Midpoint Circle Algorithm**

CommentsNo comment yet.