摘要
基于平行线原理提出一种新的区域填充算法并运用于环形多边形的面积量算中。首先,绘制一组等间距平行线并计算与多边形边界的交点值;其次,从第二条平行线开始,依次和前一条平行线配对组成一个矩形区域并计算面积;最后,利用自定义的算法判断每个矩形区域两端的小三角形区域是否保留或删除,从而计算出整个环形多边形区域的面积。通过对单一、相交、凹进和凸起、复杂多边形区域面积量算得出的数据表明,该算法能快速准确计算指定区域面积且具有较好的通用性。
Based on the parallel line principle, propose a new area filling algorithm and applied to the area calculation of circular polygon. The firstly, draw a set of equidistant parallel lines and calculates the intersection value with the polygon boundary; The Secondly, starting from the second parallel line, paired with the previous parallel line to form a rectangular area and calculate the area; Lastly, the custom algorithm is used to determine whether the small triangle area is triangle area at both end of the area of the entire ring polygon area is calculated. The experiment data which obtained by calculating the area of single, intersecting, inclinations and bulges, complex polygon show that the algorithm can calculate the area of specified circular polygon accurately and has a good applicability.
引文
[1]任继成,刘慎权。区域填充扫描线算法的改进[J].计算机辅助设计与图形学学报,1998,10(6): 481-486.
[2]陈优广,顾国庆,王玲。一种基于缝隙码的区域填充算法[J]。中国图象图形学报,2007,12(11): 2086-2092.
[3]张正峰,马少飞,李玮。新的种子点区域填充算法[J]。计算机工程与应用,2009,45(6):201-202.
[4] 邱国清。基于等间距平行线区域填充算法[J]。内蒙古农业大学学报,2017,38(2):90-92.
[5]唐永勇,冯剑,陈国民,等。机械制图中CAD 教学的软件选择与教学设计[J]。图学学报,2014,35(5):798-803.
[6]闫浩文,杨树文,孙建国,等。计算机地图制图原理与算法基础[M]。北京:科学出版社,2007: 132-134.
[7]董改芳,付学良。 群优化算法的研究与改进[J]。内蒙古农业大学学报(自然科学版),2003,33(2):185-188.
[8]于海燕,蔡鸿明,何援军。图学计算基础[J]。图学学报,2013,34(6):1-5.