高级检索

直线与典型曲线的统一反走样整数生成算法

Unified Integral Algorithm for Anti-aliased Lines and Typical Curves

  • 摘要: 针对目前尚不存在有效的圆和椭圆的整数反走样算法问题,利用修改的中点法,提出了完全利用整数运算实现的像素级反走样直线、圆和椭圆逐点绘制的统一算法.根据中点法中的误差控制参数和候选点与理想曲线间的位置关系计算出精确距离,舍弃作用微小的高阶小量,利用查表或区间二分检索法转换为像素的亮度.该算法仅在中点法基础上进行局部调整,结构简单,且因为仅使用整数基本运算来实现,具有快速的光滑直线、圆和椭圆生成速度,有利于硬件实现.文中算法不仅实现了纯整数高质量快速曲线反走样绘制,也使得基本图形与反走样图形可以在一个框架下容易地生成.

     

    Abstract: Aim at the lacks of effective integral anti-aliased algorithm to generate circle and ellipse, using modified midpoint generating algorithm, a unified algorithm completely using integer operation to realized pixel level anti-aliased line, circle and ellipse is presented. According to the error control parameter of midpoint algorithm, the new algorithm calculated the accurate distance between candidate point and idea curves, abandoned the higher-order epsilon with litter effect, and used looking-up table or range bisection method to determine the lightness of the nearest pixel. This algorithm only modified part of the original algorithm and inherited its simple structure. Furthermore, due to the only use of integer operation, the algorithm can generate smooth line, circle and ellipse rapidly and is also convenient for hardware implementation. The proposed algorithm not only provided a fast integral approach to draw anti-aliased curves, but also made the basic graphs and the anti-aliased to be easily generated under the same framework.

     

/

返回文章
返回