Student: rpwang 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): 10 one clip correct (10): 10 two clips correct (10): 10 extra credit (5): 0 ---------------------------------------------- total (100): 95 Comments: ---------------------------------------------- Bresenham Algorithm: A good implementation. One little thing: your central loops are pretty cluttered. You could try to make a lot of the decisions outside of that main loop so that you have a lot fewer if statements within it. But no big deal. Cohen-Sutherland: The idea of the Cohen Sutherland is that it is a recursive algorithm. Yours is not recursive but it works. Note however that the recursive algorithm is more efficient than yours (since every time we compute the op-codes we have the chance to trivially accept or reject a line segment, whereas in yours, if you don't trivially accept or reject it initially, then you STILL Have to go through testing each point against the four boundaries. *************************************************