<p>So you have a series of points and, at each point, a supplied derivative?</p>
<p>Is a piecewise cubic sufficient or does it need higher derivative continuity?  If the former is ok, then <a href="https://en.wikipedia.org/wiki/Cubic_Hermite_spline" rel="nofollow noreferrer">Cubic Hermite Splines</a> will do the job. (If you need, they can be trivially mapped into cubic Beziers)</p>

CC BY-SA 4.0
2021-02-02T09:06:54.083Z
2021-02-02T09:06:54.083Z
Simon F
<p>Have been searching a lot for a good spline interpolation library in cpp, came across one, which is the famous Eigen library , having the unsupported counterpart for spline fitting.&lt;<a href="https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1SplineFitting.html#a7bd937fdcfa168dbdc27932886a4da9f" rel="nofollow noreferrer">Here</a>&gt;.
I need spline fitting API that also accepts derivatives.</p>
<p>Eigen's <strong>InterpolateWithDerivatives</strong> API claim to offer that but it is not without bugs. What alternatives do I have?</p>

CC BY-SA 4.0
2021-02-02T15:26:01.387Z
https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/interpolation.html
user14717
<c++><geometry><interpolation><curve><bezier-curve>
Spline interpolation library in cpp
Argha Chakraborty
# Spline interpolation library in cpp

(Asked by: username_0 on 2021-01-31)

Have been searching a lot for a good spline interpolation library in cpp, came across one, which is the famous Eigen library , having the unsupported counterpart for spline fitting.<[Here](https://eigen.tuxfamily.org/dox/unsupported/structEigen_1_1SplineFitting.html#a7bd937fdcfa168dbdc27932886a4da9f)>.
I need spline fitting API that also accepts derivatives.

Eigen's **InterpolateWithDerivatives** API claim to offer that but it is not without bugs. What alternatives do I have?

**Tags:** c++, geometry, interpolation, curve, bezier-curve

> **Comments:**
> **username_1**: https://www.boost.org/doc/libs/1_75_0/libs/math/doc/html/interpolation.html  

---

## 1 answers

### Answer by username_2 on 2021-02-02. Score: 1

So you have a series of points and, at each point, a supplied derivative?

Is a piecewise cubic sufficient or does it need higher derivative continuity? If the former is ok, then [Cubic Hermite Splines](https://en.wikipedia.org/wiki/Cubic_Hermite_spline) will do the job. (If you need, they can be trivially mapped into cubic Beziers)


---

