Solution-: Calculate The Points Between The Starting Point (5, 6) and Ending Point (13, 10) - Using DDA Algorithm
Solution-: Calculate The Points Between The Starting Point (5, 6) and Ending Point (13, 10) - Using DDA Algorithm
ASSITGMENT 1
COMPUTER GRAPHICS
Q2: Calculate the points between the starting point (5, 6) and ending point (13, 10).
Using DDA algorithm.
Solution-
Given-
Step-01:
Calculate ΔX, ΔY and M from the given input.
ΔX = Xn – X0 = 13 – 5 = 8
ΔY =Yn – Y0 = 10 – 6 = 4
M = ΔY / ΔX = 4 / 8 = 0.50
Step-02:
Calculate the number of steps.
As |ΔX| > |ΔY| = 8 > 4, so number of steps = ΔX = 8
Zaid bin shafi 19bcs9504
Step-03:
As M < 1, so case-01 is satisfied.
Now, Step-03 is executed until Step-04 is satisfied.
5 6 6 6.5 (6, 7)
7 7 (7, 7)
8 7.5 (8, 8)
9 8 (9, 8)
10 8.5 (10, 9)
11 9 (11, 9)
13 10 (13, 10)
Zaid bin shafi 19bcs9504