502 views

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$

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)

by

### 1 comment

In step 7, it has to be y=y-1 and that is why option 4 is not correct.

Ans is (d). Beacause if d>=0, then d=4∗(x–y)+10, x=x+1 and y=y–1