欢迎访问《图学学报》 分享到:

图学学报

• 几何设计与计算 • 上一篇    下一篇

格网划分的双策略跟踪多边形裁剪算法

  

  • 出版日期:2012-12-31 发布日期:2015-07-29

Polygon clipping algorithm based on dual-strategies tracing and grid partition

  • Online:2012-12-31 Published:2015-07-29

摘要: 论文提出了一种高效稳定的多边形裁剪算法,算法支持带内环的平面简单
多边形,同时也支持多边形的“并”和“差”等布尔运算。首先,设计了算法所需的数据结构;
其次,基于直线扫描转换Bresenham 算法原理提出了边网格划分的有效算法,并应用一个简
单的方法避免不同网格内边的重复求交;最后,将交点分类为普通交点和顶交点,并针对这
两类交点构造了不同的跟踪策略,在跟踪过程中交替、递归地应用这两个策略来确保算法处
理特殊情况时的稳定性。与其它同类算法的比较表明,新算法具有更高的效率。

关键词: 凹多边形, 多边形裁剪, 跟踪策略, 网格划分, 单线性链表

Abstract: An effective algorithm for polygon clipping which supports simple polygons
including concave polygons and polygons with holes inside is presented in this paper. This
algorithm can be used to calculate set-theoretic differences and union of two polygons. Most
analogous algorithms are classifying point of intersection by entry points and exit points, then
generating output polygons by tracing vertex. Different from these algorithms, this paper classifies
point of intersection by normal point of intersection and vertex of intersection, and designs
different tracing strategies for them. By using these strategies alternately and recursively, a steady
tracing process to cope with degenerate input is putted forward. To improve efficiency of edge
intersection, which is the bottleneck of polygon clipping, it partitions the polygon that has more
numbers of edges to grids and brings forward an algorithm for edge partition based on Bresenham
line-drawing algorithm. At the end of this paper, the algorithm is compared with the existing
algorithms and the result shows that it has higher speed than others.

Key words: concave polygons, polygon clipping, tracing strategy, grid partition, singly
linked list