PRINT your name clearly ________________________________________________ Your ID no. ________________
Question 1.
The following is a description of the Bresenham line-drawing algorithm. You are to use it to fill in a table of values, as described below.
Fill your values in the following table. (If you change your mind, no need to erase, you can construct another table.)
________________________________________________ k pk (xk+1, yk+1) ________________________________________________ ________________________________________________
When you're done, draw a grid of pixels from x and y = 0 to x and y = 5 and shade in the pixels that your table shows are to be plotted. Does your line appear to be computed properly? (If not, try to correct your table.)
Question 2.
Describe how to compute the pixels to plot using the DDA algorithm applied to the line in Question 1. (You'll find it convenient to do your computations using values of the form 3 3/4, etc.)