首页> 中文期刊> 《计算机应用》 >基于像素链的直线绘制算法

基于像素链的直线绘制算法

         

摘要

In order to increase the efficiency of the line drawing algorithm when the slope of the line is greater than 0.5,a line drawing algorithm based on pixel chain was proposed. A straight line was treated as an aggregation of several horizontal pixel chains or diagonal pixel chains. An algorithm of line drawing in a reverse direction, which was similar to Bresenham algorithm, was introduced, by which the slope between 0.5 and 1 was converted to that between 0 and 0.5 while generating line. One pixel chain was generated by one judgment. The simulation results show the straight line generated by new algorithm is as same as that generated by Bresenham algorithm, but the calculation is greatly reduced. The new algorithm has generated two integer arithmetic: addition and multiplication, and it is suitable for hardware implementation. The generation speed of the new algorithm is 4 times of Bresenham algorithm with the same complexity of design.%针对直线生成算法在直线斜率大于0.5时的低效率问题,提出一种基于像素链的直线绘制算法.将直线看做是由许多条平行像素链或对角像素链拼接而成,提出并利用逆向生成直线的类Bresenham算法,将斜率在0.5~1的直线绘制转换为斜率在0~0.5的直线绘制,一次判断生成一条像素链.仿真实验表明,基于像素链的算法生成的直线与Bresenham算法生成直线一致,且计算量显著减少.该算法只有加法和乘法两种整数运算,适合硬件实现,其绘制速度是Bresenham算法的4倍.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号