欢迎来到天天文库
浏览记录
ID:46604187
大小:386.94 KB
页数:6页
时间:2019-11-26
《基于未加权区域采样的直线反走样算法》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、2013年6月第39卷第6期北京航空航天大学学报JournalofBeijingUniversityofAeronauticsandAstronauticsJune2013V01.39No.6基于未加权区域采样的直线反走样算法毛峡刘运龙薛雨丽(北京航空航天大学电子信息工程学院,北京100191)摘要:直线作为组成图形的基本元素,其生成方法一直是计算机图形学研究的基础内容之一.针对非垂直且非水平直线在光栅图形显示器存在的走样现象,结合经典的Bre—senham算法和未加权区域采样思想,提出一种新的反走样直线生成算法.相比于传统的未加权区域采样以及wu算法,该算法主要利用整数加减运算完成直线的
2、反走样,计算简单,利于FPGA(FieldProgrammableGateArray)硬件实现.仿真结果表明:新算法的仿真速度约为传统未加权区域采样的3倍,与Wu算法仿真速度相当;利用Wu算法生成的直线平滑性较好,但是沿着直线方向的某些相邻像素灰度值相差较大,而新算法生成的直线不但平滑效果好,而且沿直线方向相邻像素灰度值相差不大,因此,相比于wu算法,新算法反走样效果更佳.关键词:反走样;Bresenham算法;未加权区域采样;FPGA中图分类号:TP391.72文献标识码:A文章编号:1001.5965(2013)06-0717-06Newanti-aliasingstraightlin
3、edrawingalgorithmbasedonunweightedareasamplingMaoXiaLiuYunlongXueYuli(SchoolofElectronicandInformationEngineering,BeijingUniversityofAeronauticsandAstronautics,Beijing100191,China)Abstract:Lineisabasicelementofgraphics.Itsdrawingalgorithmisalwaysoneofthebasiccontentofcomputergraphicsresearch.Inord
4、ertosolvethealiasingphenomenongeneratedwhendrawinganon-verticalandnon-horizontalstraightlineonarastergraphicsmonitor,basedonBresenhamalgorithmandthethoughtofthetraditionalunweightedareasamplingalgorithm,anewanti—aliasingstraightlinedrawingalgorithmwasputforward.Comparedtothetraditionalalgorithmand
5、thewell-knownWualgorithm,thenewalgorithmprincipal-lyusedintegeradditionandsubtractiontodrawanti—aliasingstraightlines.Thecalculationofthenewalgo—rithmwassimpleandthenewalgorithmcouldbeeasilyimplementedinFPGAhardwareplatform.Experimen—talresultsshowthatthesimulationspeedobtainedbythenewalgorithmwhe
6、ndrawinglinesisnearlythreetimesasfastasthatobtainedbythetraditionalalgorithmandisalmostequivalenttothatobtainedbyWualgo—rithm.AlthoughthestraightlinegeneratedbyWualgorithmhasgoodsmootheffect,alongthestraightlinedi-rectionadjacentpixels’greyvaluessometimeshavelargedifference.However,thenewalgorithm
7、notonlyhasgoodsmootheffect,butalsocanfindagoodsolutiontosolvetheproblemWualgorithmhas.Therefore,com—paredwithWualgorithm,thenewalgorithm’Santi·aliasingeffectismuchbetter.Keywords:anti—aliasing;Bresenhamalgorithm;
此文档下载收益归作者所有