摘要
递归种子填充算法在对多边形区域填充时存在一个点多次进出堆栈且占用大量存储空间,只适合于细小区域填充.为此,基于Morton码原理提出一种改进算法.首先,将填充胚的行列值转换成十进制Morton码,其次将每个填充胚的值与堆栈中的种子点Morton码一一匹配,避免堆栈中出现重复点,最后采用环状扫描线方式按顺时针或逆时针方向对多边形区域进行扫描填充.经过实验数据验证,改进算法能节省较多的存储空间,避免一个点反复多次进出堆栈.
Recursive seed filling algorithm on ploygon filling when there is a multiple import and stack occu-pies a lot of storage space,only suitable for small area filling. Therefore,based on the Morton code principleand proposes an improved algorithm. First,the filling embryo value into the rank of hexadecimal Mortoncode. Second,fill each embryo one by one in orde to avoid duplication of point stack. Last,use the circularscan line in clockwise or counterclockwise direction of polygon scan fill. A lot of experiment date show,thenew algorithm can save more storage space than old way and avoid one point repeated import stack.
出处
《淮北师范大学学报(自然科学版)》
CAS
2017年第1期64-67,共4页
Journal of Huaibei Normal University:Natural Sciences
基金
福建省教育厅科研项目(JAT160290)