摘要
本文在分析现有二维线裁剪算法的基础上,提出了具最少算术运算量的算法.新算法充分利用了矩形裁剪窗口的凸性和窗口边界线平行于坐标轴的特性,沿两组平行的窗口边界线对线段进行裁剪.通过将被裁剪线段定义为有向线段、确定窗口边界的进出边,避免了不必要的求交计算.实际算例表明,这一算法比当前国际上最快的线裁剪算法省时约一年.
A new 2-D line clipping algorithm with the least arithmetic operations is presented. It takes advantage of the regulary of the rectangular clipping window whose boundary lines are parallel to the coordinates axes. Lines are clipped successively against the two sets of parallel boundaries of the window. With the introduction of the direction for each line segment, the entry and exit boundary lines of the clipping window are classified, resulting in less intersection calculation for the process. The new algorithm is better than the other existing ones.
出处
《计算机学报》
EI
CSCD
北大核心
1991年第7期495-504,共10页
Chinese Journal of Computers
基金
国家自然科学基金
国家教委博士点基金