Line Drawing

  1. Describe a line drawing algorithm that draws a dot-dash line in some pattern. The pattern is supplied as a string of 0’s and 1’s.  For example a pattern such as 00111111 indicates a dash is off for two pixels and on for six.                                                                                                              
  2. Using your algorithm above, describe how you would continue the pattern while drawing the boundary of a polygon. That is the pattern is to continue seamlessly from one polygon edge to the next.      
  3. Describe an efficient method of line drawing on a raster device.                        
  4. Describe an efficient method of circle drawing on a raster device.     

Bresenham Line Drawing

  1. Bresenhams algorithim uses an iterative term, Ti+1, the value of which is used to determine the position of the subsequent pixel. How is this term derived ?
  2. Outline in detail Bresenham’s line algorithm for the special case where the slope of the line is between 0 and 1. You should show how the term variable is derived. Show how to iterate on the term variable.  
  3. Describe how you would draw the following sets of line with bresenham