InterviewSolution
Saved Bookmarks
| 1. |
Implement the DDA algorithm to draw a line from (0, 0) to (7, 7)? |
|
Answer» S-2: m=(7-0)/(7-0) = 7/7 which is EQUAL to 1. S-3: As m EQUALS to 1 (m=1) therefore x will be increased by 1 and y will be incremented by m. S-4 : The step will be x1=x1+1 and y1= y1+1. This would be a 45 degree line where x and y both have equal incremented value |
|