1 #ifndef __SP_BEZIER_UTILS_H__
2 #define __SP_BEZIER_UTILS_H__
46 Point
bezier_pt(
unsigned degree, Point
const V[],
double t);
48 int bezier_fit_cubic(Point bezier[], Point
const data[],
int len,
double error);
51 unsigned max_beziers);
54 Point
const &tHat1, Point
const &tHat2,
55 double error,
unsigned max_beziers);
61 template <
typename iterator>
63 cubic_bezier_poly_coeff(iterator b, Point *pc) {
71 for(
int i = 0; i < 4; i++) {
75 for(
int i = 0; i < 4; i++) {
77 for(
int j = 0; j <= i; j++) {
78 pc[3 - j] += c[cp]*(*b);
int bezier_fit_cubic_r(Point bezier[], Point const data[], int const len, double const error, unsigned const max_beziers)
Definition: bezier-utils.cpp:131
int bezier_fit_cubic(Point *bezier, Point const *data, int len, double error)
Definition: bezier-utils.cpp:116
int bezier_fit_cubic_full(Point bezier[], int split_points[], Point const data[], int const len, Point const &tHat1, Point const &tHat2, double const error, unsigned const max_beziers)
Definition: bezier-utils.cpp:198
Point darray_right_tangent(Point const d[], unsigned const len, double const tolerance_sq)
Definition: bezier-utils.cpp:783
Point darray_left_tangent(Point const d[], unsigned const len)
Definition: bezier-utils.cpp:713
Point bezier_pt(unsigned const degree, Point const V[], double const t)
Definition: bezier-utils.cpp:673