Skip to main content

Posts

Showing posts with the label circle generation

Mid-point Circle Generation Algorithm

Mid-Point circle generation algorithm aims to find out the points that lie on the circle (or approximately lie on the circle) in a pixel based display. This Algorithm is similar to Bresenhams Circle Generation Algorithm , According to wikipedia bresenhams algorithm is derived from mid-point circle generation algorithm. In this algorithm we divide the circle into 8 parts and calculate the points only for one part and then apply the property of symmetry to get the points in the remaining 7 parts. We divide the circle into the following parts. At the beginning we start with the point x = 0, y = r ; so we get the first point as (xc + x, yc + y) which lies on the circle. let us denote this point as (xp, yp). now we have check if the neighbouring point (xp - 1, yp + 1) or (xp, yp + 1) lies on the circle, We do this by checking the value of the variable called parameter which checks if the point lies on the circle or not and accordingly we update the value of x and y to plo...