All mock tests are FREE till 31 December — register to save your progress

Which of the statements given below are correct? The midpoint (or Bresenham) algorithm for rasterizing lines is optimized relative to DDA algorithm in that

A. it avoids round‐off operations.

B. it is incremental.

C. it uses only integer arithmetic.

D. all straight lines can be displayed as straight (exact).

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. A, B, and C only M

Explanation

Bresenham/midpoint avoids rounding, works incrementally and uses only integer arithmetic. It cannot make every line exactly straight on a pixel grid, so D is false.

More Programming Languages and Computer Graphics questions