项目作者: acorbe

项目描述 :
Cubic Hermite Splines in Gnuplot. C1 (continuous + continuous 1st der.) piece-wise functions made of cubic polynomials.
高级语言: Gnuplot
项目地址: git://github.com/acorbe/gnuplot-cubic-hermite-spline.git
创建时间: 2019-10-14T04:58:02Z
项目社区:https://github.com/acorbe/gnuplot-cubic-hermite-spline

开源协议:MIT License

下载


Cubic splines for gnuplot

Library to create cubic hermite splines in gnuplot. Cubic splines are C1 piece-wise polynomial functions (of local degree 3) for which are specified value and first-derivative of the control points.

Lagrangian Structure Function

I used this library to create sketches of second-order [Lagrangian structure functions for turbulence (e.g. Fig.3 in this paper) as in the example above.

Usage

  1. load "cubic_hermite_spline.lib.gnu"
  2. set parametric
  3. plot 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.