python implementation Cohen-Sutherland algorithm