F
itgrid is an interpolation package for one-dimensional data and for
two-dimensional gridded data. Fitgrid is based on
Alan Cline's Fortran package Fitpack, an early version of which is available
from netlib. Fitpack
uses splines under tension to interpolate in one and two dimensions.
Fitgrid provides C entries that are equivalent to the Fortran entries in
Fitpack. Also, NCAR Command Language (NCL) entries for Fitgrid are among
NCL's built-in functions and procedures.
Fitgrid can be used to interpolate single-valued periodic and nonperiodic
functions. Entries also exist for finding derivatives and integrals.
In general, Fitgrid's fitted splines will go through the
original data points, but
an entry exists for providing a "smoothing spline" that is not
constrained to go through the original data values.
Fitgrid entries also exist for interpolating parametric curves in the plane:
and for two-dimensional interpolation for gridded data:
The red balls in the above plot mark the values in the original
dataset.
Fitgrid uses a fitted curve algorithm, and its interpolated curves and
surfaces have continuous slopes.