计算机应用研究2012,Vol.29Issue(3):1175-1177,3.DOI:10.3969/j.issn.1001-3695.2012.03.104
基于像素链排序的直线绘制算法
Line drawing algorithm based on sorting pixel chains
摘要
Abstract
In order to increase the low efficiency of the line drawing algorithm when the slope of the line is at 0. 5 ~ 1 ,this paper proposed a line drawing algorithm based on sorting pixel chains. It treated a straight line as an aggregation of several horizontal pixel chains or diagonal ones. The attribute of a line and an algorithm of line drawing in a reverse direction, which was similar to the Bresenham algorithm, were used to calculate the length of all the pixel chains. The algorithm sorted the pixel chains by the codes generated by Bresenham algorithm. It generated one pixel chains by one judgment. Simulation results show that the accuracy of straight line generated by new algorithm is as same as that generated by the Bresenham algorithm, and the pomputation is greatly reduced. The new algorithm only has two integer arithmetic, addition and multiplication, so it is suitable for hardware implementation.关键词
计算机图形学/直线绘制算法/Bresenham算法/逆向生成直线/像素链/排序/整数运算Key words
computer graphics/ line drawing algorithm/ Bresenham algorithm/ line generation in reverse direction/ pixel chains/ sorting/ integer arithmetic分类
信息技术与安全科学引用本文复制引用
朱晓林,蔡勇,张建生..基于像素链排序的直线绘制算法[J].计算机应用研究,2012,29(3):1175-1177,3.基金项目
国家自然科学基金资助项目(10576027) (10576027)