首页 | 本学科首页   官方微博 | 高级检索  
     

用最小回路求两个简单多边形的交、并、差集
引用本文:赵军,刘荣珍. 用最小回路求两个简单多边形的交、并、差集[J]. 计算机应用, 2012, 32(11): 3164-3167. DOI: 10.3724/SP.J.1087.2012.03164
作者姓名:赵军  刘荣珍
作者单位:兰州交通大学 机电工程学院, 兰州 730070
基金项目:甘肃省自然科学基金项目资助项目(1107RJZA216);国家自然科学基金资助项目(51165017)
摘    要:针对求两个简单多边形交、并、差集问题,提出一种基于最小回路的新算法。首先,将初始多边形P和Q初始化为逆时针方向,并将两个多边形交点处的关联边排序。然后,从各个交点出发利用最小转角法搜索最小回路,并根据这些最小回路中包含P和Q边的方向性对它们进行分类。最终,不同类别的最小回路将对应P和Q的交、并、差集。算法的时间复杂度为O((n+m+k)logd),其中n、m 分别是P和Q的顶点数,k是两多边形的交点数,d为将多边形分割的单调链数。算法几何意义明显,对于多边形布尔运算中的重合顶点、重合边等奇异情形,具有较好的适应性。

关 键 词:多边形  顶点  最小回路  布尔运算  
收稿时间:2012-05-23
修稿时间:2012-07-21

Resolving intersection,union and difference of two simple polygons based on minimum circle
ZHAO Jun,LIU Rong-zhen. Resolving intersection,union and difference of two simple polygons based on minimum circle[J]. Journal of Computer Applications, 2012, 32(11): 3164-3167. DOI: 10.3724/SP.J.1087.2012.03164
Authors:ZHAO Jun  LIU Rong-zhen
Affiliation:School of Mechatronic Engineering, Lanzhou Jiaotong University, Lanzhou Gansu 730070,China
Abstract:A new algorithm for Boolean operation of two simple polygons based on minimum circle was presented. Polygon P and Q were initialized to counter clockwise direction, and the edges connecting to each intersection point of P and Q were arranged in sequential order. Then, all minimum circles were found using the minimum turning angle rule. These minimum circles were classified according to edges direction in P and Q. Intersection, union, and difference of the two polygons are corresponding to different kinds of minimum circles. The algorithm run in time O((n+m+k)logd) in a worst presented case, where n and m were the vertex numbers of the two polygons respectively, k was the numbers of intersection points, and d was the number of polygon’s monotonic chain. The algorithm has explicit geometric significance, and well resolves the problems in special cases,such as overlapped edges, and operation edges intersection at the vertex of edges.
Keywords:polygon   vertex   minimum circle   Boolean
本文献已被 CNKI 等数据库收录!
点击此处可从《计算机应用》浏览原始摘要信息
点击此处可从《计算机应用》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号