https://github.com/acorbe/gnuplot-cubic-hermite-spline
Cubic Hermite Splines in Gnuplot. C1 (continuous + continuous 1st der.) piece-wise functions made of cubic polynomials.
https://github.com/acorbe/gnuplot-cubic-hermite-spline
gnuplot gnuplot-graphs gnuplotlib
Last synced: 2 months ago
JSON representation
Cubic Hermite Splines in Gnuplot. C1 (continuous + continuous 1st der.) piece-wise functions made of cubic polynomials.
- Host: GitHub
- URL: https://github.com/acorbe/gnuplot-cubic-hermite-spline
- Owner: acorbe
- License: mit
- Created: 2019-10-14T04:58:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-11T06:51:20.000Z (over 5 years ago)
- Last Synced: 2025-01-22T06:37:50.152Z (4 months ago)
- Topics: gnuplot, gnuplot-graphs, gnuplotlib
- Language: Gnuplot
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cubic splines for gnuplot
Library to create [cubic hermite splines](https://en.wikipedia.org/wiki/Cubic_Hermite_spline) in [gnuplot](http://www.gnuplot.info/). Cubic splines are C1 piece-wise polynomial functions (of local degree 3) for which are specified value and first-derivative of the control points.

I used this library to create sketches of second-order [Lagrangian structure functions for turbulence (e.g. [Fig.3 in this paper](https://pure.tue.nl/ws/files/3141669/Metis218551.pdf)) as in the example above.
### Usage
```gnuplot
load "cubic_hermite_spline.lib.gnu"
set parametricplot t, cubHerMulti5t(x0,u0, x1,u1, x2,u2, x3,u3, x4,u4, x5,u5 ,t)
```
Here `xi,ui` are, respectively, the value of the spline and of its first derivative.
The functions `cubHerMulti2t`, ..., `cubHerMulti5t` expect, respectively, 2, ... , 5 input control points.
### TODO
The library can be easily extended to more control points; the API as well should be modified to accept arrays as inputs.