摘要
在分析原有图形裁剪算法的基础上,具体讨论了改进后的多边形窗口内点、线、面目标的裁剪算法。其中,点目标的裁剪采用射线交叉法,线目标的裁剪是通过计算被裁剪线段和多边形各边真实交点之间各子线段的中点来判断是否对它们实施裁剪,在点、线裁剪的基础上实现了面目标的裁剪。该算法能快速、正确地得到结果。
Based on the analysis of the existing algorithms, this paper discussed a new algorithm for point、line and region clipping against a polygon. Point clipping adopt method of ray crossing. Line clipping 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. Based on point clipping and line clipping , region clipping can be realized. The algorithms can deal with all kinds of situations easily and correctly.
出处
《太原理工大学学报》
CAS
北大核心
2005年第2期160-163,共4页
Journal of Taiyuan University of Technology
基金
山西省"十五"资助项目(011064)
关键词
裁剪
算法
多边形
clipping
algorithm
polygon