COM1370 Summer 2002 - Written Assignment #1

Professor Futrelle


Due date: Wednesday, July 17th, hardcopy handed in at the beginning of class. Have your name, course, and other pertinent information and staple multiple sheets together!

Problem 1. Use the midpoint line algorithm to manually calculate the y pixel values for a starting point of x=2, y=3 and extending to x = 11. The slope you should use for your computations is to be chosen from the list below based on the right-most two digits of your Social Security number. To check your results do the full computation of the y values using the standard slope formula and rounding.

Social Security digits Slope
00-07 2/3
08-15 2/5
16-23 3/4
24-31 3/5
32-39 3/7
40-47 3/8
48-55 4/5
56-63 4/7
64-71 4/9
72-79 5/6
80-90 5/7
90-99 5/8

Problem 2. Use the scan-line polygon fill algorithm of Section 3.6 by building an edge table and determining the start and end x values of lines for successive scan line y values. The polygon you'll deal with is a triangle, as shown in the figure below.

The coordinates of A are (10,10). The coordinates of B and C are chosen based on the next-to-last two right-most digits of your Social Security number, e.g., 47 in 368-38-0479.

Social Security digits B (x,y) C (x,y)
00-07 12,15 14,6
08-15 12,15 14,7
16-23 12,15 14,8
24-31 13,14 14,6
32-39 13,14 14,7
40-47 13,14 14,8
48-55 13,15 14,6
56-63 13,15 14,7
64-71 13,15 14,8
72-79 12,14 15,6
80-90 12,14 15,7
91-99 12,14 15,8

Go to COM1370 home page

Return to Prof. Futrelle's home page