Algorithm 1: Function to determine the outcode of the endpoints. |
function CODE(x); begin c := [0000]; if x < thenc := [1000] else if x > thenc := [0100]; if y < thenc := c lor [1001] else if y > thenc := c lor [0010]; CODE := c end [CODE]; |
Algorithm 1: Function to determine the outcode of the endpoints. |
function CODE(x); begin c := [0000]; if x < thenc := [1000] else if x > thenc := [0100]; if y < thenc := c lor [1001] else if y > thenc := c lor [0010]; CODE := c end [CODE]; |