CS 3744, Assignment 7 - Due April 27, 2010

Please show all your work!

  1. Use the Bresenham algorithm to scan convert the line from (0, 0) to (40, 27) and construct the first 10 chain codes for that line.

  2. Given the results of Problem 1, construct the first 10 chain codes for the line from (0, 0) to (-40, 27) and also for the line from (0, 0) to (-27, 40).

  3. Use the decimal DDA algorithm to scan convert a line at a 20° angle and construct the first 10 chain codes for that line.

  4. Use the Bresenham circle algorithm to scan convert a circle of radius 10 from 90° to 0° and give the chain codes for the output of the algorithm.

    HINT: Run the algorithm as long as x ≤ y. For the next octant, fold over the results from the previous octant.

  5. Consider the Cyrus-Beck clipping algorithm given in class, given a 2D clip window with xmin = 5, xmax = 15, ymin = 10, and ymax = 30. Show the detailed steps and results of the algorithm for the line segment (3, 10) to (10, 35)

This assignment is due in class on the date above.