Cohen-Sutherland Algorithm Source Code


For this source code, we use a Pascal set to represent the outcode, because this representation is more natural than an array of four booleans. We use an internal procedure to calculate the outcode for modularity; to improve performance, we would, of course, put this code in-line.




From P. Asokarathinam -- see details 27.11.1996