Below are the few steps given for scan-converting a circle using Bresenham’s…

2017

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

  1. A.

    Compute 𝑑 = 3 − 2𝑟 (where 𝑟 is radius)

  2. B.

    Stop if 𝑥 > 𝑦

  3. C.

    If 𝑑 < 0, then 𝑑 = 4𝑥 + 6 and 𝑥 = 𝑥 + 1

  4. D.

    If 𝑑 ≥ 0, then 𝑑 = 4 ∗ (𝑥 − 𝑦) + 10,𝑥 = 𝑥 + 1 and 𝑦 = 𝑦 + 1

Attempted by 108 students.

Show answer & explanation

Correct answer: D

Correct Bresenham (midpoint) circle algorithm — concise steps:

  1. Initialize: set x = 0, y = r, and d = 3 − 2r.

  2. Plot the symmetric points for current (x, y): plot (xc ± x, yc ± y) and the other seven symmetric positions.

  3. Loop condition: repeat while x ≤ y (equivalently, stop when x > y).

  4. Decision and updates:

    • If d < 0: update d = d + 4x + 6, then set x = x + 1. (y stays the same.)

    • If d ≥ 0: update d = d + 4*(x - y) + 10, set x = x + 1 and y = y - 1. (Move diagonally; y must decrease.)

Common mistake: incorrectly incrementing y when d ≥ 0. That is wrong because the correct diagonal step reduces y (y = y − 1); increasing y would move in the wrong direction and break the circle symmetry.

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…