38 Spline(
const std::vector<double> &t,
39 const std::vector<SplinePair> &
xy,
83 void checkTIncrements (
const std::vector<double> &t)
const;
85 void computeCoefficientsForIntervals (
const std::vector<double> &t,
86 const std::vector<SplinePair> &
xy);
87 void computeControlPointsForIntervals ();
90 std::vector<SplineCoeff> m_elements;
93 std::vector<double> m_t;
96 std::vector<SplinePair> m_xy;
99 std::vector<SplinePair> m_p1;
100 std::vector<SplinePair> m_p2;
const int INNER_RADIUS_MIN
Single X/Y pair for cubic spline interpolation initialization and calculations.
Cubic interpolation given independent and dependent value vectors.
SplinePair p2(unsigned int i) const
Bezier p2 control point for specified interval. P0 is m_xy[i] and P3 is m_xy[i+1].
SplinePair interpolateControlPoints(double t) const
Return interpolated y for specified x, for testing.
SplinePair findSplinePairForFunctionX(double x, int numIterations) const
Use bisection algorithm to iteratively find the SplinePair interpolated to best match the specified x...
SplinePair p1(unsigned int i) const
Bezier p1 control point for specified interval. P0 is m_xy[i] and P3 is m_xy[i+1].
void computeUntranslatedCoefficients(double aTranslated, double bTranslated, double cTranslated, double dTranslated, double tI, double &aUntranslated, double &bUntranslated, double &cUntranslated, double &dUntranslated) const
From coefficients in xy=d*(t-ti)^3+c*(t-ti)^2+b*(t-ti)+a we compute and return the coefficients in xy...
SplinePair interpolateCoeff(double t) const
Return interpolated y for specified x.
Unit test of spline library.