Computer Engineering and Applications ›› 2016, Vol. 52 ›› Issue (3): 215-219.

Previous Articles     Next Articles

Algorithm for generating anti-aliasing circle based on gray recurrence

GAO Jing, JIA Yinliang, LI Bingyang   

  1. College of Automation Engineering, Nanjing University of Aeronautics and Astronautics, Nanjing 210016, China
  • Online:2016-02-01 Published:2016-02-03

基于灰度递推的反走样圆生成算法

高  静,贾银亮,李冰洋   

  1. 南京航空航天大学 自动化学院,南京 210016

Abstract: With the development of special graphic display technology, high requirements have been put forward to the effect of it. In order to improve the anti-aliasing efficiency, recursive relationship has been set up between the pixel gray and coordinates of the circle. In the algorithm, pixel gray nearest to the circle in each loop is used as decision parameters. Quadratic term is eliminated to simplify calculation, and the error is amended it takes. Since gray results can be obtained without calculation or conversion, the algorithm is more effective than others. Test shows that the result of this anti-aliasing algorithm has improved the execution efficiency.

Key words: circle, anti-aliasing, pixel gray, recurrence

摘要: 随着图形显示技术的特殊应用,对图形的显示效果提出了较高的要求。为了提高圆的反走样效率,建立了像素灰度与坐标之间的递推关系实现圆的反走样算法。该算法将每次循环中离理想圆弧最近的像素灰度作为判断依据,通过省略二次项带来简化计算,再对省略二次项带来的灰度误差进行修正,每次像素灰度结果可以直接输出,不需要再进行计算或转换,比其他算法的执行速度更快。经过验证,该算法的反走样效果和执行效率都比较好。

关键词: 圆, 反走样, 像素灰度, 递推