Fast algorithms for clipping lines and line segments in E2

E2 are presented. The suggested algorithms are based on a technique of coding the line direction together with the end points of the clipped line segment. They solve all cases more effectively. The algorithms are convenient for clippings lines or line segments by rectangle. Theoretical considerations and experimental results are also presented.