摘要
在计算机上模拟现实中美术工作者使用的画刷一直是二维矢量编辑器必备的功能,本文介绍了如何在计算机上模拟绘图画刷的算法,其思想是将用户通过鼠标输入的一组离散的点转换成具有画刷风格的矢量图形,先对多边形画刷的外形定义,再对画刷的连续移动进行轨迹合成,最后实现特定的形状的画刷的轨迹。在此基础上实现了矩形、斜四边形、圆形画刷的算法设计。本文亦针对稠密的轨迹出现的自环绕现象,提出了反锯齿算法,并减少了自环绕圈数。实验测试结果表明,该算法效果良好,达到了预期目标。
How to simulate the pain brush in computer graphics is a necessary function of vector editor.This paper presents a solution to simulate paintbrush in computer.a brush-style vector graphics are obtained by inputting a set of discrete points through mouse,and the polygon shape brush can be defined in some order,the final a track of the brush to be achieved.On this basis,this paper presente a algorithm of the rectangular,oblique square,round brush.This article also describe the anti-aliasing algorithm,and reduce the number of laps around the self.Experimental results show that the algorithm works well.
出处
《微计算机信息》
2011年第5期227-228,共2页
Control & Automation