Student: jjlilley Assignment: 2 Grader: Charlie ************************************************ Bresenham: program runs, buggy (55): 55 correct implementation of Bresenham (20): 20 no floats and divides (20): 20 extra credit (5): 4 ---------------------------------------------- total (100): 99 Cohen-Sutherland: program runs, buggy (55): 45 inside case correct (10): 10 outside case correct (10): 10 one clip correct (10): 10 two clips correct (10): 10 extra credit (5): 0 ---------------------------------------------- total (100): 85 Comments: ---------------------------------------------- Bresenham: Great! Very efficient implementation of Bresenham that works for all 8 octants. Cohen-Sutherland: Your implementation of Cohen-Sutherland is not quite correct. You are not using the outcodes correctly. To determine whether or not the line clips the left edge all you have to do is check ((code1&LEFT)>0) Also, although you've managed to reduce the number of java statements, you've added some inefficiency. I'm referring to cases when neither of the endpoints are changed, yet you still recalculate both outcodes. This could be fixed by recalculating only the outcodes if necessary. *************************************************