摘要
针对使用灰度控制算法不能准确绘制端点不在像素中心点的直线的问题,结合Wu算法,提出了一种基于灰度控制的任意端点直线反走样算法。介绍了Wu算法思想和灰度控制反走样算法,对两种算法进行数学分析,提出灰度控制不能解决的问题及问题产生的后果。结合Wu算法提出了新的基于灰度控制的算法,新算法减少了距离计算和灰度转换的计算,同时解决了任意端点直线的反走样问题。对新算法的效率和反走样效果进行仿真计算。仿真结果表明,新算法比Wu算法效率更高,绘制直线所用时间平均减少33.91%;新算法比灰度控制算法绘制直线更准确,特别是在直线移动的过程中,有较好的动态显示效果。本文提出的新算法,效率较高,显示效果较好,具有很高的应用价值。
Aiming at the problem that gray control algorithm can't draw accurately a line whose endpoints do not in the center of a pixel,combined with the Wu algorithm,an anti-aliasing algorithm for arbitrary-endpoint line based on gray control is proposed.Firstly,Wu algorithm and gray control algorithm are introduced in the paper.Through analyzing the both algorithms,advantages and disadvantages of them are proposed.Then,combined with the Wu algorithm,a new algorithm based on gray control is put forward.The new algorithm reduces the calculation of distance and gray transformation,solves the anti-aliasing problem of arbitrary-endpoint line.Finally,the efficiency and antialiasing performance of the new algorithm is simulated.The simulation results show that the new algorithm has higher efficiency than the Wu algorithm,consuming time is reduced by an average of33.91% when drawing a line,and is more accurate and has better anti-aliasing effect than the gray control algorithm.Especially in the process of line's moving,the algorithm has a good dynamic display effect.The new algorithm proposed in this paper has higher efficiency,better display effect and very high application value.
出处
《液晶与显示》
CAS
CSCD
北大核心
2016年第4期392-398,共7页
Chinese Journal of Liquid Crystals and Displays
基金
总装预研基金资助项目(No.102080501)
航空基金资助项目(No.20100818015)~~
关键词
反走样
灰度控制
Wu算法
任意端点直线
anti-aliasing
gray control
Wu algorithm
arbitrary-endpoint line