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?
- A.
7
- B.
6
- C.
8
- 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.