| With the rapid development of virtual reality, human-computer interaction and computer animation and other related disciplines, People have more and more high requirement for computer graphics sense of reality. Crop occupy a very important position in computer graphics applications, the paper studies the two-dimensional line clipping algorithm proposed by previous scholars, and elaborates of the advantages and disadvantages of them deeply; on this basis, the paper proposed based on Conhenimproved algorithms Cohen-Sutherland line clipping on Cohen-Sutherland line clipping improved algorithm and Nicholl-Lee-Nicholl improved algorithm and achieved good results.This paper firstly studies Cohen-Sutherland line clipping algorithm, analyse the shortage of existing algorithms,and improve the algorithm to meet Cohen-Sutherland line clipping algorithm,that it not only can not effectively judge whether line segment is completely outside the window or not, but also they could gain the invalid intersection. This paper presents a improved Cohen-Sutherland line clipping algorithm. Giving a segment,by calculating the directed distance of vertex of clipping window to directed line,to gain the sign of directed distance to determine the positional relationship between clipping and the segment line in order to avoid obtaining invalid intersection operation. Experiments show that Cohen-Sutherland improved algorithm is more efficient than the original algorithm.In order to avoid multiple intersection,through the creation of multiple regions around the cutting window,NLN linear cutting algorithm can achieve more regional test before,so as to gain intersection.NLN algorithm must compare respectively the slope of segment with any one endpoint to the four corners of attachment slope.Many times Comparison of slope operation reduces the efficiency of cutting. Improved NLN linear cutting algorithm can make full use of positional relationship of two endpoints of the line and the four corners.The operation of line segment implicit equation improved the cutting efficiency. |