首页 | 本学科首页   官方微博 | 高级检索  
     

一种快速的多线宽直线反走样算法
引用本文:骆朝亮,谢忠. 一种快速的多线宽直线反走样算法[J]. 计算机工程与应用, 2011, 47(21): 188-190. DOI: 10.3778/j.issn.1002-8331.2011.21.049
作者姓名:骆朝亮  谢忠
作者单位:中国地质大学 信息工程学院,武汉 430074
摘    要:对于直线绘制中出现的锯齿现象称为走样,消除走样的方法称为反走样,通过对直线走样产生的原因进行理论上的分析,了现有的反走样技术。通过对经典的DDA直线绘制算法和Wu直线反走样绘制算法的研究,在二者结合的基础上,给出了一种任意宽度和复杂背景色下的直线反走样快速绘制算法:对于直线f(x)=mx+b,0≤m≤1,x轴上每移动一个像素单位,根据直线所需绘制的宽度,在y轴上进行跨度像素着色,填充的色深取决于该像素到对应直线边缘线的距离、原有背景色和当前直线绘制色。对算法进行了去浮点优化,给出了复杂度分析和实验结果。实践证明,该算法有很好的执行效率和反走样效果。

关 键 词:直线绘制  反走样  数值微分分析法(DDA)  快速  
修稿时间: 

Rapid algorithm for anti-aliasing of arbitrary width line drawing
LUO Chaoliang,XIE Zhong. Rapid algorithm for anti-aliasing of arbitrary width line drawing[J]. Computer Engineering and Applications, 2011, 47(21): 188-190. DOI: 10.3778/j.issn.1002-8331.2011.21.049
Authors:LUO Chaoliang  XIE Zhong
Affiliation:Faculty of Information Engineering,China University of Geosciences,Wuhan 430074,China
Abstract:This paper theoretically analyzes anti-aliasing problem.A solution based on the classical DDA(Digital Differential Analyzer) algorithm and Wu anti-aliasing algorithm is proposed to address the issue.The solution offers an efficient line drawing algorithm which is applicable to arbitrary line width and complex background color.Specifically the algorithm makes pixel by pixel move along x(y) axis while filling span pixels along line direction of y(x) based on line width.The filling color is dependent on three factors including current pixel's distance from the line's centerline,original background color and current line drawing color.This algorithm is further optimized with floating-point and complexity analysis.Experiment result and application of the new algorithm are presented.
Keywords:line drawing  anti-aliasing  Digital Differential Analyze(rDDA)  rapid
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机工程与应用》浏览原始摘要信息
点击此处可从《计算机工程与应用》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号