2 Header file for spline.cc
4 Part of the swftools package.
6 Copyright (c) 2001,2002,2003 Matthias Kramm <kramm@quiss.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
33 struct plotxy control;
40 struct plotxy control1;
41 struct plotxy control2;
45 typedef enum {APPROXIMATE_INFLECTION=0, APPROXIMATE_RECURSIVE_BINARY=1} approximate_method;
47 int approximate(struct plotxy p0, struct plotxy p1, struct plotxy p2, struct plotxy p3, struct qspline*q);
49 struct plotxy splinepos(struct plotxy p0, struct plotxy p1, struct plotxy p2, struct plotxy p3, double d);
50 double plotxy_dist(struct plotxy a, struct plotxy b);
52 plotxy cspline_getpoint(cspline*s, double t);
53 plotxy cspline_getderivative(cspline*s, double t);
54 plotxy cspline_getderivative2(cspline*s, double t);
55 plotxy cspline_getderivative3(cspline*s, double t);
56 void cspline_getequalspacedpoints(cspline*s, float**p, int*num, double dist);
57 int cspline_approximate(struct cspline*s, struct qspline*q, double quality, approximate_method method);
59 plotxy qspline_getpoint(qspline*s, double t);
60 plotxy qspline_getderivative(qspline*s, double t);
61 plotxy qspline_getderivative2(qspline*s, double t);
62 double qspline_getlength(qspline*s);
63 void qsplines_getequalspacedpoints(qspline**s, int num, float**p, int*pnum, double t);