摘要
针对Cohen-Sutherland线段编码裁剪算法仅是孤立地处理被裁减线段两端点这一弊端,提出一种基于Cohen-Sutherland线段裁剪算法的改进算法,它充分利用线段的整体信息,构造出合理分割窗口的辅助线以对线段与窗口相对位置关系进行更精确的判断,避免无效交点的计算,使线段与窗口交点的计算量降到最低水平,提高裁剪的整体效率.该改进处理思路同样适用于其他的裁剪算法.
In the algorithm of Cohen-Sutherland segment clipping, two terminal points of the clipped segment are encoded respectively according to the areas in which they locate. Using the codes the segments which do not intersect with any boundary of the clipping window or its extending would be determined rapidly. But the idea that studies every terminal point respectively makes no use of the segment information and brings on the inefficient work for the segment which intersect with the boundaries of the window or their extendings. Here much improvement is made to make good use of the information of the segment itself. Some assistant lines are created to partition the clipping window, then according to the feature of the area which the clipped segment belongs to, the relationship of the location between the segment and the window can be distinguished well and truly. So the calculation of the cross-points is performed only when it is needed. This means a faster clipping algorithm. And the idea in the paper would hold true for other clipping algorithms.
出处
《北京工业大学学报》
CAS
CSCD
北大核心
2002年第4期483-486,共4页
Journal of Beijing University of Technology
基金
北京市自然科学基金资助项目(D070601-01)
北京市科委基金资助项目(N070601-01)
北京市教委基金资助项目(P070701-01)