Student: jingq Assignment: 2 Grader: Charlie ************************************************ Bresenham: program runs, buggy (55): 55 correct implementation of Bresenham (20): 20 no floats and divides (20): 5 extra credit (5): 0 ---------------------------------------------- total (100): 80 Cohen-Sutherland: program runs, buggy (55): 35 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): 75 Comments: ---------------------------------------------- Bresenham: You really did not need any floats or divisions to implement Bresenham correctly. See the book H&B for more details. You could also implement all 8 octants with one loop. Cohen-Sutherland: Your implementation of Cohen-Sutherland is way too complicated. You are not using the outcodes correctly. First of all, you aren't using the constants LEFT, RIGHT, TOP, and BOTTOM that we provide to create your outcodes (which you call flag) Second, you are not using the calculated outcodes to determine whether or not the line should be clipped. For example, you are checking if (y1 > vp.top) rather than if ((flag1 & TOP)>0) NOTE: Make sure you turnin your code! *************************************************