## Professor Futrelle

Version of 8 February 2005

### Due at the beginning of class, Tuesday, February 15th

You are to draw your problems and answers and do your computations by hand on paper: properly stapled together and titled with assignment #, date, class, name, etc.

The problems here are essentially the same as a set of important ones on the Midterm Exam (Tues 2/22).

Problem #1: Using the code on page 75 (and continuing to 76), hand compute the drawing of three different lines:

• A line from 3,5 to 7,9.
• A line from 2,3 to 7,4.
• A line from 1,2 to 6,6.

Problem #2: For a triangle with vertices 5,0 and 8,3 and 6,7, construct the edge table as in Fig. 3.18. Work through the algorithm and show the active edge table at scan line y=5.

Problem #3: Make up three different examples of lines intersecting a rectangle and clip them, step, by step, using the Cohen-Sutherland algorithm.

• A non-horizontal line intersecting the right and left (vertical) edges of the rectangle.
• A line intersecting the top and right edges of the rectangle.
• A line that intersects the bottom edge only.

Problem #4:

• Make up two simple examples of polygons intersecting a rectangle and clip them, step, by step, using the Sutherland-Hodgman algorithm. Label each step according to which case it is, Fig. 3.32.
• Apply the same algorithm, again, step-by-step, to the polygon below, that intersects the rectangle.