in Computer Graphics recategorized
502 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$
in Computer Graphics recategorized
502 views

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)

1 comment

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

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

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true