Student: leeying Assignment: 2 Grader: Charlie ************************************************ Bresenham: program runs, buggy (55): 55 correct implementation of Bresenham (20): 20 no floats and divides (20): 10 extra credit (5): 2 ---------------------------------------------- total (100): 87 Cohen-Sutherland: program runs, buggy (55): 55 inside case correct (10): 10 outside case correct (10): 5 one clip correct (10): 10 two clips correct (10): 10 extra credit (5): 0 ---------------------------------------------- total (100): 90 Comments: ---------------------------------------------- Bresenham: You should not have used floats to compare the slope. Comparing m to 1 is the same as comparing dy to dx. So you could have gotten rid of all the floats. To have really simple code, you code have implemented all 8 octants with 1 loop. Cohen-Sutherland: Good! One minor error though. There is a case when a line should be external but your algorithm returns clipped. This happens when the line is not immediately trivially rejected. For example, a line that has endpoints with outcodes 0100 and 0001. *************************************************