• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2007, Vol. 29 ›› Issue (12): 85-86.

• 论文 • 上一篇    下一篇

计算多边形交集、并集面积的算法

魏许青   

  • 出版日期:2007-12-01 发布日期:2010-05-30

  • Online:2007-12-01 Published:2010-05-30

摘要:

平面多边形交集与并集面积的计算机算法可以利用多边形裁剪算法来实现。本文提出的算法思想是利用Weiler-Atherton多边形裁剪算法中的多边形链表,在遍历链表时遇到交点就改变跟踪方向,这样可以求出并集顶点表,求交集时只要从入点开始跟踪遇到交点再改变跟踪方向;最后,通过交集和并集表求出它们的面积。多边形可以是凸的或凹的、甚至是带孔的。

关键词: 多边形 交集面积 并集面积 算法

Abstract:

An algorithm for evaluating the intersection or union area of polygons can be implemented by polygon cllp- ping. The main idea in this paper is using  polygon lists in Weiler-Atherton’s algorithm for polygon clipping. While traversing the list, the algorithm changes direction when it meets the interse ection points, then the poknt-sets of the union of poly- gons can be obtained. On the other hand, if the algorithm starts traversing from an entry point and changes direction when it meets the points of intersection,the point-sets of the overlap can be obtained. Finally, with the two lists we can evalua te their area. The algorithm can handle general polygons including concave polygons and even polygons with holes inside.

Key words: polygon,, area of overlap, area of union, algorithm