2 Header file for spline.cc
4 Part of the swftools package.
6 Copyright (c) 2001 Matthias Kramm <kramm@quiss.org>
8 This file is distributed under the GPL, see file COPYING for details */
21 struct plotxy control;
28 struct plotxy control1;
29 struct plotxy control2;
33 typedef enum {APPROXIMATE_INFLECTION=0, APPROXIMATE_RECURSIVE_BINARY=1} approximate_method;
35 int approximate(struct plotxy p0, struct plotxy p1, struct plotxy p2, struct plotxy p3, struct qspline*q);
37 struct plotxy splinepos(struct plotxy p0, struct plotxy p1, struct plotxy p2, struct plotxy p3, double d);
38 double plotxy_dist(struct plotxy a, struct plotxy b);
40 plotxy cspline_getpoint(cspline*s, double t);
41 plotxy cspline_getderivative(cspline*s, double t);
42 plotxy cspline_getderivative2(cspline*s, double t);
43 plotxy cspline_getderivative3(cspline*s, double t);
44 void cspline_getequalspacedpoints(cspline*s, float**p, int*num, double dist);
45 int cspline_approximate(struct cspline*s, struct qspline*q, double quality, approximate_method method);
47 plotxy qspline_getpoint(qspline*s, double t);
48 plotxy qspline_getderivative(qspline*s, double t);
49 plotxy qspline_getderivative2(qspline*s, double t);
50 double qspline_getlength(qspline*s);
51 void qsplines_getequalspacedpoints(qspline**s, int num, float**p, int*pnum, double t);