Efficient Algorithm for Line Clipping against General Polygon
Bo-Lin Li · Journal of Southwest Jiaotong University · 2004
Based on the analysis of advantages and disadvantages of the existing algorithms, a new algorithm for line clipping was proposed. This algorithm is composed of three steps: the intersection points of a line to be clipped and a general polygon are calculated, the line is cut into several sub-lines based on the intersection points, and whether these sub-line are cut or not is decided in light of their central points. The algorithm can deal with all kinds of situations easily and correctly.