Implement the dda algorithm to draw a line from (0 0) to (6 6)
Answers
Answered by
16
Answer & Explanation:
Let us first calculate the slope of the given line
m = (6-0)/(6-0) = 1
Since the slope of the line is 1, we will sample the points at unit x intervals i.e. dx=1
then the next point on y axis corresponding to the previous point plotted will be
y(k+1) = y(k) + m
The table below shows the points to be plotted
(x,y)
(0,0)
(1,1)
(2,2)
(3,3)
(4,4)
(5,5)
(6,6)
Similar questions
Social Sciences,
7 months ago
Computer Science,
7 months ago
Science,
7 months ago
Physics,
1 year ago
Physics,
1 year ago
Math,
1 year ago
Math,
1 year ago