Student: prettig Assignment: 2 Grader: Damian ************************************************ Bresenham: program runs (55): 55 correct implementation of Bresenham (20): 20 no floats and divides (20): 20 extra credit (5): 5 ---------------------------------------------- total (100): 100 Cohen-Sutherland: program runs (55): 55 inside case correct (10): 10 outside case correct (10): 5 one clip correct (10): 10 two clips correct (10): 5 extra credit (5): 0 ---------------------------------------------- total (100): 85 Comments: ---------------------------------------------- Bresenham algorithm: Good job. Works well. Cohen-Sutherland Algorithm: Oops. You have a problem with your CohenSutherland algorithm. Try drawing a line from the region on right of the viewport to a point on the top of the viewport, without passing through the viewport at all. The line that should be clipped completely is drawn for the region to the top right of the viewport. This is because you're NOT correctly implementing Cohen Sutherland, which is a recursive algorithm (yours is not.) The reason yours doesn't work is because you don't allow for the fact that clipping an endpoint against one boundary could put it into another region. In the case I described above, you clipped the second point against the top of the viewport, but that just puts the new point into a different region, still outside of the viewport (the top-right). The way to fix this is to just redo the algorithm correctly - i.e. recursively. Ask me if you have any questions. *************************************************