recategorized
1,119 views
0 votes
0 votes

Below are the few steps given for scan-converting a circle using Bresenham’s Algorithm. Which of the given steps is not correct?

  1. Compute $d= 3-2r$ (where $r$ is radius)
  2. Stop if $x>y$
  3. If $d< 0$, then $d=4x+6$ and $x=x+1$
  4. If $d\geq 0$, then $d=4 \ast(x-y)+10, \: x=x+1$ and $y=y+1$
recategorized

2 Answers

0 votes
0 votes

Algorithm

Step 1 − Get the coordinates of the center of the circle and radius, and store them in x, y, and R respectively. Set P=0 and Q=R.

Step 2 − Set decision parameter D = 3 – 2R.

Step 3 − Repeat through step-8 while X < Y.

Step 4 − Call Draw Circle (X, Y, P, Q).

Step 5 − Increment the value of P.

Step 6 − If D < 0 then D = D + 4x + 6.

Step 7 − Else Set Y = Y + 1, D = D + 4(X-Y) + 10.

Step 8 − Call Draw Circle (X, Y, P, Q).

Ans: (D)

Answer:

Related questions

0 votes
0 votes
3 answers
1
0 votes
0 votes
3 answers
2
0 votes
0 votes
2 answers
4