If a line is drawn from (2, 3) to (6, 15) using DDA algorithm. How many points…

2026

If a line is drawn from (2, 3) to (6, 15) using DDA algorithm. How many points will be needed to generate such lines?

  1. A.

    7

  2. B.

    6

  3. C.

    8

  4. D.

    13

Attempted by 33 students.

Show answer & explanation

Correct answer: D

To determine the number of points generated by the DDA algorithm, calculate the absolute differences in coordinates: dx = |6 - 2| = 4 and dy = |15 - 3| = 12. The number of steps is determined by the maximum of these differences, which is max(4, 12) = 12. Since the algorithm includes both the starting and ending points in the count, add 1 to the step count. Total points = 12 + 1 = 13.

Explore the full course: Up Lt Grade Assistant Teacher 2025