Introduction - If you have any usage issues, please Google them yourself
Liangyou Dong-Barsky clipping algorithm, the algorithm' s basic idea: When you want to cut the line is P0P1, P0P1 and window borders intersect at A, B, C, D four points. From A, B and P0 to find the closest three points P1, from C, D P0 and P1 to find the closest point.