###
Arguments

####
X

The abscissa vector. *
X*
should be floating-point or double-precision.

####
Y

The vector of ordinate values corresponding to X. *
Y *
should be floating-point or double-precision.

Neither X or Y need be monotonic.

####
Xr

A named variable that will contain the abscissa values of the interpolated function.

####
Yr

A named variable that will contain the ordinate values of the interpolated function.

###
Keywords

####
INTERVAL

Set this keyword equal to the desired interval in XY space between interpolants. If omitted, approximately 8 interpolants per XY segment will result.

####
TAN0

The tangent to the spline curve at X[0], Y[0]. If omitted, the tangent is calculated to make the curvature of the result zero at the beginning. TAN0 is a two element vector, containing the X and Y components of the tangent.

####
TAN1

The tangent to the spline curve at X[*
n*
-1], Y[*
n*
-1]. If omitted, the tangent is calculated to make the curvature of the result zero at the end. TAN1 is a two element vector, containing the X and Y components of the tangent.

###
Example

The commands below show a typical use of SPLINE_P:

X = [0.,1,0,-1,0]

Y = [0.,1,2,1,0]

SPLINE_P, X, Y, XR, YR

PLOT, XR, YR

As above, but with setting both the beginning and end tangents:

SPLINE_P, X, Y, XR, YR, TAN0=[1,0], TAN1=[1,0]

This yields approximately 32 interpolants.

As above, but with setting the interval to 0.05, making more interpolants, closer together:

SPLINE_P, X, Y, XR, YR, TAN0=[1,0], TAN1=[1,0], INTERVAL=0.05

This yields 116 interpolants and looks close to a circle.