Computer Science, asked by vandanabmoyri, 7 months ago


In Bresenham's circle generation algorithm, if (x,y) is the
current pixel position then the y value of the next pixel
position is​

Answers

Answered by Anonymous
0

Answer:

Bresenham’s circle drawing algorithm

It is not easy to display a continuous smooth arc on the computer screen as our computer screen is made of pixels organized in matrix form. So, to draw a circle on a computer screen we should always choose the nearest pixels from a printed pixel so as they could form an arc. There are two algorithm to do this:

Mid-Point circle drawing algorithm

Bresenham’s circle drawing algorithm

We have already discussed the Mid-Point circle drawing algorithm in our previous post.In this post we will discuss about the Bresenham’s circle drawing algorithm.

Both of these algorithms uses the key feature of circle that it is highly symmetric. So, for whole 360 degree of circle we will divide it in 8-parts each octant of 45 degree. In order to that we will use Bresenham’s Circle Algorithm for calculation of the locations of the pixels in the first octant of 45 degrees. It assumes that the circle is centered on the origin. So for every pixel (x, y) it calculates, we draw a pixel in each of the 8 octants of the circle as shown below :

Answered by Sahil3459
0

Answer:

The y value of the next pixel position will be y or y-1​.

Explanation:

The closest pixel point is chosen to finish the arc using Bresenham's Circle Drawing Algorithm.

What will the y value of the following pixel position be if (x,y) is the current pixel position?

While most algorithms in common processors use floating-point arithmetic, Bresenham's circle generation algorithm uses integer arithmetic, making it far faster than other algorithms. The circle's first octant and the point (x, y) are both on it.

One of two methods can be used to determine the location of the subsequent pixel:

  • N(x + 1, y)
  • S(x + 1, y - 1)

The decision parameter d, which is as follows, determines it:

  • If d <= 0, then the next pixel will be N(x + 1, y)
  • If d > 0, then the next pixel will be S(x + 1, y - 1)

Therefore, the next pixel's y value is either y or y-1.

Thus, the Bresenham Circle Drawing Algorithm makes an effort to produce an octant's worth of points. The eight symmetry trait is used to generate the points for other octacts.

Similar questions