摘要
直线扫描转换算法是计算机图形学和计算机辅助设计等领域最基本、最重要的算法之一,直线反走样算法也是光栅化图形算法中的重要内容。文中提出了一种基于点到直线距离的直线扫描转换算法,给出了算法的推导过程及代码表示,并介绍了算法在直线反走样中的具体应用。该算法基于增量技术,采用点到直线的距离作为判别式,在扫描转换过程中,可方便地根据点到直线的距离,采用加权区域采样的方法进行直线的反走样,提高了反走样的效率;具有只使用整型变量、不涉及乘除运算的特点,适合硬件实现。
Line generating algorithm is one of the most important and basic algorithms in computer graphics and computer aided design.Anti-aliasing algorithm is very important content in graphics algorithm.It presents a line scan conversion algorithm based on distance of point to line and gives the algorithm derivation process and code.It introduces specific application of algorithm in line anti-aliasing.This algorithm is a method which uses increment technology.It regards distance of point to line as discriminant,it draws anti-aliasing line by method of weighted region sampling,which is convenient to draw anti-aliasing line according to the distance of point to line on the scan conversion process.It can improve efficiency of anti-aliasing.The algorithm possesses special features which use integer variable,not concerned with multiplication and division.It is suit for hardware implementation.
出处
《计算机技术与发展》
2012年第3期51-54,共4页
Computer Technology and Development
基金
甘肃省自然科学基金项目(0803RJZA109)
关键词
直线扫描转换
算法
反走样
line scan conversion
algorithm
anti-aliasing