#ifndef PZGeo4_H #define PZGeo4_H /* Last edited on 2007-01-25 10:08:52 by stolfi */ #define PZGeo3_H_author \ "Based on PZ_geo.h by H.C.G.Leitão and J.Stolfi, 1999-08." \ "Adapted by L.A.P.Lozada, 1999-2000." #include r4_t PZGeo4_LinearInterpolate(double t, double a, r4_t *pa, double b, r4_t *pb); /* Interpolates linearly the position at time {t} between points {pa} and {b}, assuming they have times {a} and {b}. */ void PZGeo4_HermiteInterpolate ( double t, double a, r4_t *pa, r4_t *va, double b, r4_t *pb, r4_t *vb, r4_t *p, r4_t *v ); /* Performs cubic Hermite interpolation for argument {t} given positions {pa} and {pb} and velocities {va} and {vb} at times {a} and {b}. Best used for {t} between {a} and {b}. */ r4_t PZGeo4_BSplineApproximation ( double t, double a, double b, r4_t *Pabc, double c, r4_t *Pbcd, double d, r4_t *Pcde, double e, r4_t *Pdef, double f ); /* Computes the position at time {t} of a cubic B-Spline curve with control points {Pabc}, {Pbcd}, {Pcde}, {Pdef}, and knot times {a},... {f}. Assumes {t} lies between {c} and {d}. */ r4_t PZGeo4_CubicBezier ( double t, r4_t *Pabc, r4_t *Pbcd, r4_t *Pcde, r4_t *Pdef ); /* Computes the position at time {t} of a cubic Bezier curve with control points {Pabc}, {Pbcd}, {Pcde}, {Pdef}. */ #endif