一般多边形窗口的有效线裁剪算法
Efficient Algorithm for Line Clipping against General Polygon
-
摘要: 在分析已有线裁剪算法优点和缺点的基础上,提出了一种新的一般多边形窗口线裁剪算法.这种新算法 通过计算被裁剪线段和多边形各边的真实交点,利用交点将被裁剪线段分成若干子线段,用各子线段的中点来 判断是否对它们实施裁剪.裁剪算法对各种情况都能快速、正确地得到结果.Abstract: Based on the analysis of advantages and disadvantages of the existing algorithms, a new algorithm for line clippingwas 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.
-
Key words:
- cutting method /
- polygon /
- computer graphics /
- line clipping
点击查看大图
计量
- 文章访问数: 1323
- HTML全文浏览量: 61
- PDF下载量: 156
- 被引次数: 0