摘要
为了实现简单、快速的光滑直线绘制,利用修改的Bresenham直线生成算法,提出了一个完全利用整数运算实现的两点宽像素级反走样直线逐点绘制算法.该算法根据距离差控制参数产生候选点与理想直线间的精确距离,进而控制两个同时被点亮的像素点的亮度.利用区间近似消除了算法中的整数乘除法运算,并利用周期性和对称性提高了算法的效率.分析表明,新算法仅比Bresenham直线生成算法多用几次整数比较运算和簿记工作,具有较高的光滑直线生成速度,且易于硬件和算法语言的实现.
For drawing the smooth straight line rapidly and easily, a two pixel thick pixel-level antialiasing straight line drawing algorithm implemented by integer operation completely was presented based on the modified Bresenham straight line generation algorithm. The proposed algorithm generated the accurate distance between the candidate point and ideal line based on the distance difference control parameter, and then controlled the brightness of two lightened pixels. The integer multiply and division operation was eliminated by means of the interval approximation, and the efficiency of the algorithm was improved using both periodicity and symmetry. The analysis results show that the new algorithm can rapidly generate the smooth straight line by using only a few more bookkeeping and integer comparison operation than Bresenham algorithm, and is easy to be implemented by both hardware and algorithmic language.
出处
《沈阳工业大学学报》
EI
CAS
2009年第6期686-690,共5页
Journal of Shenyang University of Technology
基金
辽宁省科学技术计划资助项目(2007410003)
关键词
反走样
直线生成
整数运算
逐点绘制
双步绘制
图形算法
亮度控制
BRESENHAM算法
antialiasing
straight line generation
integer operation
pixel-level drawing
double-step drawing
graphics algorithm
brightness control
Bresenham algorithm