致谢
声明
考虑Fourier级数的复数形式,我们总可以把一个周期函数写成
在二维的情况下,我们把矢量化
我们的目标是通过待绘制的图样来得到,由于点阵图样分辨率低、描述需要的参数多,并不适合用Fourier级数来拟合,所以我们采用图样更加光滑、需要参数少且可以无损放大的SVG格式来表示图样(有人也是这样想的)。在SVG格式的文档中,一条曲线路径Path
是用Bézier曲线描述的:
The cubic curve,
C
, is the slightly more complex curve. Cubic Béziers take in two control points for each point. Therefore, to create a cubic Bézier, three sets of coordinates need to be specified.C x1 y1, x2 y2, x y (or) c dx1 dy1, dx2 dy2, dx dy
The last set of coordinates here (
x
,y
) specify where the line should end. The other two are control points. (x1
,y1
) is the control point for the start of the curve, and (x2
,y2
) is the control point for the end. The control points essentially describe the slope of the line starting at each point. The Bézier function then creates a smooth curve that transfers from the slope established at the beginning of the line, to the slope at the other end.
故考虑一条三阶Bézier曲线
写成关于的函数
我们可以把待绘制的图案切成一条条的Bézier曲线前后连接,在时域上就是每一条Bézier曲线对应一个起始时间和,其中,此时就有
从而得到
由此我们成功从SVG图像中获得了绘图所需的Fourier系数