Detailed description of Fitgrid procedures


CURV1 - calculate values for CURV2 usage


This subroutine calculates certain values that are used by CURV2 in order to compute an interpolatory spline under tension through a sequence of functional values. The actual computation of the interpolated values must be done using CURV2.
--------------------------------------------------------------
            Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL CURV1 (N,       | Integer | Input  |
            X,       | Real    | Input  | N
            Y,       | Real    | Input  | N
            SLP1,    | Real    | Input  | 
            SLPN,    | Real    | Input  | 
            ISLPSW,  | Integer | Input  |
            YP,      | Real    | Output | N
            TEMP,    | Real    | Input  | N
            SIGMA,   | Real    | Input  | 
            IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input data -- (Y(K) is the functional value at X(K) for K=1,N).
SLP1
A user-specified value for the desired slope at X(1). See ISLPSW below if you want to have a value calculated internally.
SLPN
A user-specified value for the desired slope at X(N). See ISLPSW below if you want to have a value calculated internally.
ISLPSW
A switch to indicate whether the slopes at the end points should be calculated internally.
= 0 if SLP1 and SLPN are user-specified.
= 1 if SLP1 is user-specified, but SLPN is internally calculated.
= 2 if SLPN is user-specified, but SLP1 is internally calculated.
= 3 if SLP1 and SLPN are internally calculated.
YP
Contains values for the second derivative (CURV1 computes these).
TEMP
Scratch space.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if X values are not strictly increasing.

CURV2 - interpolate at a specified point


This function interpolates a value at a specified point using a spline under tension. CURV1 must be called prior to calling CURV2, and the values thus obtained used as input to CURV2. CURV2 returns the interpolated function value at the X-coordinate specified.
--------------------------------------------------------------
                Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
FUNCTION CURV2 (T,       | Real    | Input  |
                N,       | Integer | Input  |
                X,       | Real    | Input  | N
                Y,       | Real    | Input  | N
                YP,      | Real    | Input  | N
                SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
The abscissa for which an interpolated function value is desired.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input data -- Y(K) is the functional value at X(K) for K=1,N.
YP
Contains values for the second derivative (as calculated by CURV1).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVD - calculate a derivative at a specified point


This function calculates a derivative at a specified point using a spline under tension. CURV1 must be called prior to calling CURVD, and the values thus obtained used as input to CURVD. The derivative value is returned.
--------------------------------------------------------------
                Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
FUNCTION CURVD (T,       | Real    | Input  |
                N,       | Integer | Input  |
                X,       | Real    | Input  | N
                Y,       | Real    | Input  | N
                YP,      | Real    | Input  | N
                SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
The abscissa for which an interpolated function value is desired.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
YP
Contains values for the second derivative (as calculated by CURV1).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVI - integrate a spline curve


This function calculates an integral between two specified limits. CURV1 must be called prior to calling CURVI, and the values thus obtained used as input to CURVI. The value of the integral is returned.
--------------------------------------------------------------
                Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
FUNCTION CURVI (XL,      | Real    | Input  |
                XU,      | Real    | Input  |
                N,       | Integer | Input  |
                X,       | Real    | Input  | N
                Y,       | Real    | Input  | N
                YP,      | Real    | Input  | N
                SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
XL
The lower limit of the integration.
XR
The upper limit of the integration.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
YP
Contains values for the second derivative (as calculated by CURV1).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVP1 - calculate values for CURVP2 usage


This subroutine calculates certain values that are used by CURVP2 in order to compute an interpolatory spline under tension through a sequence of functional values for a periodic function. The actual computation of the interpolated values must be done using CURVP2.
--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL CURVP1 (N,       | Integer | Input  |
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             P,       | Real    | Input  | 
             YP,      | Real    | Output | N
             TEMP,    | Real    | Input  | N x 2
             SIGMA,   | Real    | Input  | 
             IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function. P must be greater than X(N)-X(1).
YP
Contains values for the second derivative (these are calculated by CURVP1).
TEMP
Scratch space.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if P is less than or equal to X(N)-X(1).
= 3 if the X values are not strictly increasing.

CURVP2 - interpolate a periodic function at a specified point


This function interpolates a value at a specified point using a spline under tension. CURVP1 must be called prior to calling CURVP2, and the values thus obtained used as input to CURVP2. The interpolated value is returned.
--------------------------------------------------------------
                 Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
FUNCTION CURVP2 (T,       | Real    | Input  |
                 N,       | Integer | Input  |
                 X,       | Real    | Input  | N
                 Y,       | Real    | Input  | N
                 P,       | Real    | Input  |
                 YP,      | Real    | Input  | N
                 SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
The abscissa for which an interpolated function value is desired.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values for the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function.
YP
Contains values for the second derivative (as computed by CURVP1).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVPI - integrate a periodic spline curve


This function calculates an integral between two specified limits. CURVP1 must be called prior to calling CURVPI, and the values thus obtained used as input to CURVPI. The value of the integral is returned.
--------------------------------------------------------------
                Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
FUNCTION CURVI (XL,      | Real    | Input  |
                XU,      | Real    | Input  |
                N,       | Integer | Input  |
                X,       | Real    | Input  | N
                Y,       | Real    | Input  | N
                P,       | Real    | Input  |
                YP,      | Real    | Input  | N
                SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
XL
The lower limit of the integration.
XR
The upper limit of the integration.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function.
YP
Contains values for the second derivative (as calculated by CURVP1).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVS - calculate values for a smoothing spline


This subroutine calculates certain values that are used by CURV2 in order to compute an interpolatory smoothing spline under tension through a sequence of functional values. The actual computation of the interpolated values must be done using CURV2.

Three parameters are used to control the degree of smoothness -- D, S, and EPS.

The parameter D is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of D controls how close the smoothed curve comes to the input data points. If D is small then the interpolated curve will pass close to the input data. The larger the value of D, the more freedom the smooth curve has in how close it comes to the input data values.

S is a more subtle global smoothing parameter. S must be non-negative. For small values of S, the interpolated curve approximates the tension spline and for larger values of S, the curve is smoother. A reasonable value for EPS is REAL(N).

EPS controls the precision to which S is interpreted; EPS must be between 0. and 1. inclusive. A reasonable value for S is SQRT(2./REAL(N)).

--------------------------------------------------------------
            Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL CURVS (N,       | Integer | Input  |
            X,       | Real    | Input  | N
            Y,       | Real    | Input  | N
            D,       | Real    | Input  | N 
            ISW,     | Integer | Input  | 
            S,       | Real    | Input  | 
            EPS,     | Real    | Input  | 
            YS,      | Real    | Output | N
            YSP,     | Real    | Output | N
            SIGMA,   | Real    | Input  | 
            TEMP,    | Real    | Input  | N x 9
            IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values for the input function -- Y(K) is the functional value at X(K) for K=1,N.
D
A user-specified value containing the observed weights. D may be either an array or a scalar, depending on the value of ISW (as described below).
ISW
A switch for interpreting the value of D. If ISW=0, then D is an array of length N (D contains an individual error estimate for each input data value); if ISW=1, then D is a scalar that serves as an error estimate for every single data item.
S
Contains the value for smoothing. S must be non-negative. Larger values for S yield greater smoothing. A reasonable value is REAL(N).
EPS
Contains a tolerance value for the relative precision to which S should be interpreted. EPS must be between 0. and 1. inclusive. A reasonable value is SQRT(2./REAL(N)).
YS
An array of length N.
YSP
An array of length N.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
TEMP
Scratch space.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if S is negative.
= 3 if EPS is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if D is negative.

CURVS1 - calculate values for a smoothing spline in the plane to be used by CURVS2


This subroutine calculates certain values that are used by CURVS2 in order to compute an interpolatory smoothing spline under tension through a sequence of functional values in the plane. The actual computation of the interpolated values must be done using CURVS2.

Three parameters are used to control the degree of smoothness -- D, S, and EPS.

The parameter D is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of D controls how close the smoothed curve comes to the input data points. If D is small then the interpolated curve will pass close to the input data. The larger the value of D, the more freedom the smooth curve has in how close it comes to the input data values.

S is a more subtle global smoothing parameter. S must be non-negative. For small values of S, the interpolated curve approximates the tension spline and for larger values of S, the curve is smoother. A reasonable value for EPS is REAL(N).

EPS controls the precision to which S is interpreted; EPS must be between 0. and 1. inclusive. A reasonable value for S is SQRT(2./REAL(N)).

--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL CURVS1 (N,       | Integer | Input  | 
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             D,       | Real    | Input  | N or 1 (see desc.)
             ISW,     | Integer | Input  | 
             S,       | Real    | Input  | 
             EPS,     | Real    | Input  | 
             PARAM,   | Real    | Output | N
             XS,      | Real    | Output | N
             YS,      | Real    | Output | N
             XSP,     | Real    | Output | N
             YSP,     | Real    | Output | N
             SIGMA,   | Real    | Input  | 
             TEMP,    | Real    | Input  | N x 19
             IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the X-coordinates for the input data. These need not be increasing.
Y
An array containing the Y-coordinates for the input data.
D
A user-specified value containing the observed weights. D may be either an array or a scalar, depending on the value of ISW (as described below). D effectively controls how close the interpolated curve will come to the input points.
ISW
A switch for interpreting the value of D. If ISW=0, then D is an array of length N (D contains an individual error estimate for each input data value); if ISW=1, then D is a scalar that serves as an error estimate for every single data item.
S
Contains the value for smoothing. S must be non-negative. Larger values for S yield greater smoothing. A reasonable value is REAL(N).
EPS
Contains a tolerance value for the relative precision to which S should be interpreted. EPS must be between 0. and 1. inclusive. A reasonable value is SQRT(2./REAL(N)).
XS
An array of length N, contains the smoothed values.
YS
An array of length N, contains the smoothed values.
XSP
An array of length N. Contains second derivative information for the X-coordinate values.
YSP
An array of length N. Contains second derivative information for the Y-coordinate values.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
TEMP
Scratch space.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if S is negative.
= 3 if EPS is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if D is negative.

CURVS2 - calculate values for a smoothing spline in the plane


This subroutine is a companion to CURV1S which must be called before calling this subroutine. CURV2S calculates an interpolated value for a smoothing spline under tension at a given point.

--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL CURVS2 (T,       | Real    | Input  | 
             N,       | Integer | Input  |
             PARAM,   | Real    | Input  | N
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             XP,      | Real    | Input  | N
             YP,      | Real    | Input  | N
             SIGMA,   | Real    | Input  | 
             XO,      | Real    | Output | 
             YO)      | Real    | Output |
--------------------------------------------------------------
T
A real value to be mapped onto the interpolating curve. Values of T between zero and one interpolate the original data; any values of T outside this range result in extrapolation.
N
The number of points which were specified to determine the curve in CURVS1.
PARAM
The arc lengths as computed by CURVS1.
X
An array containing the X-coordinates for the input data as input to CURVS1. These need not be increasing.
Y
An array containing the Y-coordinates for the input data as input to CURVS1.
XP
An array of second derivative values as calculated by CURVS1.
YP
An array of second derivative values as calculated by CURVS1.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
XO
The interpolated X value.
YO
The interpolated Y value.

CURVPS - calculate values for a smoothing spline


This subroutine calculates certain values that are used by CURVP2 in order to compute an interpolatory smoothing spline under tension through a sequence of functional values for a periodic function. The actual computation of the interpolated values must be done using CURVP2.

Three parameters are used to control the degree of smoothness -- D, S, and EPS.

The parameter D is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of D controls how close the smoothed curve comes to the input data points. If D is small then the interpolated curve will pass close to the input data. The larger the value of D, the more freedom the smooth curve has in how close it comes to the input data values.

S is a more subtle global smoothing parameter. S must be non-negative. For small values of S, the curve approximates the tension spline and for larger values of S, the curve is smoother. A reasonable value for S is REAL(N).

EPS controls the precision to which S is interpreted; EPS must be between 0. and 1. inclusive. A reasonable value for EPS is SQRT(2./REAL(N)).

--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL CURVPS (N,       | Integer | Input  |
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             P,       | Real    | Input  |
             D,       | Real    | Input  | N 
             ISW,     | Integer | Input  | 
             S,       | Real    | Input  | 
             EPS,     | Real    | Input  | 
             YS,      | Real    | Output | N
             YSP,     | Real    | Output | N
             SIGMA,   | Real    | Input  | 
             TEMP,    | Real    | Input  | N x 11
             IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function. P must be greater than X(N)-X(1).
D
A user-specified value containing the observed weights. D may either be an array or a scalar, depending on the value of ISW.
ISW
A switch for interpreting the value of D. If ISW=0, then D is an array of length N (an error estimate for each input data value); if ISW=1, then D is a scalar that serves as an error estimate for every single data item.
S
Contains the value for smoothing. S must be non-negative. Larger values for S yield greater smoothing. A reasonable value is REAL(N).
EPS
Contains a tolerance value for the relative precision to which S should be interpreted. EPS must be between 0. and 1. inclusive. A reasonable value is SQRT(2./REAL(N)).
YS
An array of length N.
YSP
An array of length N.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
TEMP
Scratch space.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if S is negative.
= 3 if EPS is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if D is negative.
= 6 if P is less than or equal to X(N)-X(1).

KURV1 - calculate values for KURV2 usage


This subroutine calculates certain values that are used by KURV2 in order to compute an interpolatory spline under tension through a sequence of points in the plane. The actual computation of the interpolated values must be done using KURV2.
--------------------------------------------------------------
            Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL KURV1 (N,       | Integer | Input  |
            X,       | Real    | Input  | N
            Y,       | Real    | Input  | N
            SLP1,    | Real    | Input  | 
            SLPN,    | Real    | Input  | 
            ISLPSW,  | Integer | Input  |
            XP,      | Real    | Output | N
            YP,      | Real    | Output | N
            TEMP,    | Real    | Input  | N
            S,       | Real    | Output | N
            SIGMA,   | Real    | Input  | 
            IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the X values of the points.
Y
An array containing the Y values of the points. Adjacent pairs of points must be distinct.
SLP1
A value (in radians) containing the slope at (X(1),Y(1)). The angles are measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 1 to point N. A value for SLP1 may be omitted as indicated by the switch ISLPSW.
SLPN
A value (in radians) containing the slope at (X(N),Y(N)). The angles are measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 1 to point N. A value for SLP2 may be omitted as indicated by the switch ISLPSW.
ISLPSW
A switch to indicate whether the slopes at the end points should be calculated internally.
= 0 if SLP1 and SLPN are user-specified.
= 1 if SLP1 is user-specified, but SLPN calculated internally.
= 2 if SLPN is user-specified, but SLP1 calculated internally.
= 3 if SLP1 and SLPN are internally calculated.
XP
An array of length N.
YP
An array of length N.
TEMP
Scratch space.
S
An array of length N. On output, S contains the polygonal arclengths of the curve.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if a pair of adjacent points coincide.

KURV2 - does interpolation for parametric curves


The interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (X[1],Y[1]) and the value 1. is mapped onto (X[N],Y[N]). KURV1 must be called before calling KURV2.
--------------------------------------------------------------
            Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL KURV2 (T,       | Real    | Input  |
            XS,      | Real    | Output |
            YS,      | Real    | Output |
            N,       | Integer | Input  |
            X,       | Real    | Input  | N
            Y,       | Real    | Input  | N
            XP,      | Real    | Input  | N
            YP,      | Real    | Input  | N
            S,       | Real    | Input  | N
            SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(N),Y(N)). Values outside of [0.,1.] result in extrapolation.
XS
Contains the X coordinate of the interpolated point that T maps to.
YS
Contains the Y coordinate of the interpolated point that T maps to.
N
The number of input data points. (N > 1)
X
An array containing the X values of the input points.
Y
An array containing the Y values of the input points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURV1.
YP
An array of length N as computed by KURV1.
S
An array of length N containing the polygonal arc lengths of the curve.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

KURVD - interpolation and derivatives for parametric curves


This subroutine behaves like KURV2 except that in addition it returns the first and second derivatives of the component functions in the parameterization. The interval [0.,1.] maps onto a curve in the plane. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. KURV1 must be called before calling KURVD.
--------------------------------------------------------------
            Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL KURVD (T,       | Real    | Input  |
            XS,      | Real    | Output |
            YS,      | Real    | Output |
            XST,     | Real    | Output |
            YST,     | Real    | Output |
            XSTT,    | Real    | Output |
            YSTT,    | Real    | Output |
            N,       | Integer | Input  |
            X,       | Real    | Input  | N
            Y,       | Real    | Input  | N
            XP,      | Real    | Input  | N
            YP,      | Real    | Input  | N
            S,       | Real    | Input  | N
            SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(N),Y(N)). Values outside of [0.,1.] result in extrapolation.
XS
Contains the X coordinate of the point that T maps to.
YS
Contains the Y coordinate of the point that T maps to.
XST
Contains the first derivatives of the X component with respect to T.
YST
Contains the first derivatives of the Y component with respect to T.
XSTT
Contains the second derivatives of the X component with respect to T.
YSTT
Contains the second derivatives of the X component with respect to T.
N
The number of input data points. (N > 1)
X
An array containing the X values of the input points.
Y
An array containing the Y values of the input points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURV1.
YP
An array of length N as computed by KURV1.
S
An array of length N containing the polygonal arc lengths of the curve, as computed by KURV1.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

KURVP1 - calculate values for KURVP2 usage


This subroutine calculates certain values that are used by KURVP2 in order to compute an interpolatory spline under tension through a sequence of points in the plane that form a closed curve. The actual computation of the interpolated values must be done using KURVP2.
--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL KURVP1 (N,       | Integer | Input  |
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             XP,      | Real    | Output | N
             YP,      | Real    | Output | N
             TEMP,    | Real    | Input  | N x 2
             S,       | Real    | Output | N
             SIGMA,   | Real    | Input  | 
             IER)     | Integer | Output | 
--------------------------------------------------------------
N
The number of input data points. (N > 1)
X
An array containing the X values of the points.
Y
An array containing the Y values of the points. Adjacent pairs of points must be distinct.
XP
An array of length N.
YP
An array of length N.
TEMP
Scratch space.
S
An array of length N.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if a pair of adjacent points coincide.

KURVP2 - does interpolation for closed parametric curves


The interpolated curve is parameterized by mapping points in the interval [0.,1.] onto an interpolated closed curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (X[1],Y[1]) and the value 1. is also mapped onto (X[1],Y[1]), since the interpolated curve is closed. KURVP1 must be called before calling KURVP2.
--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL KURVP2 (T,       | Real    | Input  |
             XS,      | Real    | Output |
             YS,      | Real    | Output |
             N,       | Integer | Input  |
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             XP,      | Real    | Input  | N
             YP,      | Real    | Input  | N
             S,       | Real    | Input  | N
             SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(1),Y(1)), since the interpolated curve is closed. Any interval [TT,TT+1.] maps onto the entire curve.
XS
Contains the X coordinate of the point that T maps to.
YS
Contains the Y coordinate of the point that T maps to.
N
The number of input data points. (N > 1)
X
An array containing the X values of the points.
Y
An array containing the Y values of the points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURV1.
YP
An array of length N as computed by KURV1.
S
An array of length N containing the polygonal arc lengths of the curve, as computed by KURV1.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

KURVPD - interpolation and derivatives for closed parametric curves


This subroutine behaves like KURVP2 except that in addition it returns the first and second derivatives of the component functions in the parameterization. The interval [0.,1.] maps onto a closed curve in the plane. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. KURVP1 must be called before calling KURVPD.
--------------------------------------------------------------
             Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL KURVPD (T,       | Real    | Input  |
             XS,      | Real    | Output |
             YS,      | Real    | Output |
             XST,     | Real    | Output |
             YST,     | Real    | Output |
             XSTT,    | Real    | Output |
             YSTT,    | Real    | Output |
             N,       | Integer | Input  |
             X,       | Real    | Input  | N
             Y,       | Real    | Input  | N
             XP,      | Real    | Input  | N
             YP,      | Real    | Input  | N
             S,       | Real    | Input  | N
             SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(1),Y(1)). Any interval [TT,TT+1.] maps onto the entire closed curve.
XS
Contains the X coordinate of the point that T maps to.
YS
Contains the Y coordinate of the point that T maps to.
XST
Contains the first derivatives of the X component with respect to T.
YST
Contains the first derivatives of the Y component with respect to T.
XSTT
Contains the second derivatives of the X component with respect to T.
YSTT
Contains the second derivatives of the X component with respect to T.
N
The number of input data points. (N > 1)
X
An array containing the X values of the input points.
Y
An array containing the Y values of the input points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURVP1.
YP
An array of length N as computed by KURVP1.
S
An array of length N containing the polygonal arc lengths of the curve, as computed by KURVP1.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

SURF1 - calculate values for SURF2 usage


This subroutine calculates certain values that are used by SURF2 in order to compute an interpolatory surface passing through a rectangular grid of function values. The surface computed is a tensor product of splines under tension. To calculate actual interpolated values, SURF2 must be called.
--------------------------------------------------------------
            Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
CALL SURF1 (M,       | Integer | Input  |
            N,       | Integer | Input  |
            X,       | Real    | Input  | M
            Y,       | Real    | Input  | N
            Z,       | Real    | Input  | IZ x N
            IZ,      | Integer | Input  |  
            ZX1,     | Real    | Input  | N
            ZXM,     | Real    | Input  | N
            ZY1,     | Real    | Input  | M
            ZYN,     | Real    | Input  | M
            ZXY11,   | Real    | Input  | 
            ZXYM1,   | Real    | Input  | 
            ZXY1N,   | Real    | Input  | 
            ZXYMN,   | Real    | Input  | 
            ISLPSW,  | Integer | Input  |
            ZP,      | Real    | Output | M x N x 3
            TEMP,    | Real    | Input  | N + N + M
            SIGMA,   | Real    | Input  | 
            IER)     | Integer | Output | 
--------------------------------------------------------------
M
The number of grid lines in the X direction. (M > 1)
N
The number of grid lines in the Y direction. (N > 1)
X
An array containing M X coordinates for grid lines in the X direction. These values must be strictly increasing.
Y
An array containing N Y coordinates for grid lines in the Y direction. These values must be strictly increasing.
Z
An array containing M x N functional values at the grid points; Z(I,J) contains the functional value at (X(I),Y(J)) for I=1,M and J=1,N.
IZ
The row dimension of the matrix Z (IZ is greater than or equal to M).
ZX1
An array containing N X-partial derivatives of the function along the line X(1), that is ZX1(J) is the X-partial derivative at point (X(1),Y(J)) for J=1,N. This parameter may be defaulted by setting ISLPSW appropriately.
ZXM
An array containing N X-partial derivatives of the function along the line X(M), that is ZXM(J) is the X-partial derivative at point (X(M),Y(J)) for J=1,N. This parameter may be defaulted by setting ISLPSW appropriately.
ZY1
An array containing M Y-partial derivatives of the function along the line Y(1), that is ZY1(I) is the Y-partial derivative at point (X(I),Y(1)) for I=1,M. This parameter may be defaulted by setting ISLPSW appropriately.
ZYN
An array containing M Y-partial derivatives of the function along the line Y(N), that is ZY1(I) is the Y-partial derivative at point (X(I),Y(N)) for I=1,M. This parameter may be defaulted by setting ISLPSW appropriately.
ZXY11
The X-Y-partial derivative at (X(1),Y(1). This parameter may be defaulted by setting ISLPSW appropriately.
ZXYM1
The X-Y-partial derivative at (X(M),Y(1). This parameter may be defaulted by setting ISLPSW appropriately.
ZXY1N
The X-Y-partial derivative at (X(1),Y(N). This parameter may be defaulted by setting ISLPSW appropriately.
ZXYMN
The X-Y-partial derivative at (X(M),Y(N). This parameter may be defaulted by setting ISLPSW appropriately.
ISLPSW
A switch to indicate which boundary derivatives are user supplied and which should be estimated internally. Where

I1 = 0 if ZX1 is user-supplied and 1 otherwise.
I2 = 0 if ZXM is user-supplied and 1 otherwise.
I3 = 0 if ZY1 is user-supplied and 1 otherwise.
I4 = 0 if ZYN is user-supplied and 1 otherwise.
I5 = 0 if ZXY11 is user-supplied and 1 otherwise.
I6 = 0 if ZXYM1 is user-supplied and 1 otherwise.
I7 = 0 if ZXY1N is user-supplied and 1 otherwise.
I8 = 0 if ZXYMN is user-supplied and 1 otherwise.

set ISLPSW = I1 + 2*I2 + 4*I3 +8*I4 +16*I5 +32*I6 + 64*I7 + 128*I8. Then, for example, if ISLPSW=0, then all derivative information is user-supplied and if ISLPSW=255, then all derivative information is to be internally estimated.

ZP
An array of size M x N x 3. On output this contains partial derivatives of the surface at the given nodes. ZP is used by SURF2.
TEMP
Scratch space.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if X or Y values are not strictly increasing.

SURF2 - 2D interpolation for gridded data


This function interpolates a surface value at a specified coordinate using bi-splines under tension. SURF1 must be called before invoking SURF2. The desired interpolated value is returned as the value of the function.
--------------------------------------------------------------
                Argument | Type    |  Mode  | Dimension
--------------------------------------------------------------
FUNCTION SURF2 (XX,      | Real    | Input  |
                YY,      | Real    | Input  |
                M,       | Integer | Input  |
                N,       | Integer | Input  |
                X,       | Real    | Input  | M
                Y,       | Real    | Input  | N
                Z,       | Real    | Input  | IZ x N
                IZ,      | Integer | Input  |  
                ZP,      | Real    | Input  | M x N x 3
                SIGMA)   | Real    | Input  | 
--------------------------------------------------------------
XX
Contains the X coordinate of a point to be mapped onto the interpolated surface.
YY
Contains the Y coordinate of a point to be mapped onto the interpolated surface.
M
The number of grid lines in the X direction. (M > 1)
N
The number of grid lines in the Y direction. (N > 1)
X
An array containing M X coordinates for grid lines in the X direction. These values must be strictly increasing.
Y
An array containing N Y coordinates for grid lines in the Y direction. These values must be strictly increasing.
Z
An array containing M x N functional values at the grid points; Z(I,J) contains the functional value at (X(I),Y(J)) for I=1,M and J=1,N.
IZ
The row dimension of the matrix Z (IZ is greater than or equal to M).
ZP
An array of size M x N x 3.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURV1DP - calculate values for CURV2DP usage

(Double precision version of CURV1)


This subroutine calculates certain values that are used by CURV2DP in order to compute an interpolatory spline under tension through a sequence of functional values. The actual computation of the interpolated values must be done using CURV2DP.
--------------------------------------------------------------
            Argument   | Type             |  Mode  | Dimension
--------------------------------------------------------------
CALL CURV1DP (N,       | Integer          | Input  |
              X,       | Double precision | Input  | N
              Y,       | Double precision | Input  | N
              SLP1,    | Double precision | Input  | 
              SLPN,    | Double precision | Input  | 
              ISLPSW,  | Integer          | Input  |
              YP,      | Double precision | Output | N
              TEMP,    | Double precision | Input  | N
              SIGMA,   | Double precision | Input  | 
              IER)     | Integer          | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input data -- (Y(K) is the functional value at X(K) for K=1,N).
SLP1
A user-specified value for the desired slope at X(1). See ISLPSW below if you want to have a value calculated internally.
SLPN
A user-specified value for the desired slope at X(N). See ISLPSW below if you want to have a value calculated internally.
ISLPSW
A switch to indicate whether the slopes at the end points should be calculated internally.
= 0 if SLP1 and SLPN are user-specified.
= 1 if SLP1 is user-specified, but SLPN is internally calculated.
= 2 if SLPN is user-specified, but SLP1 is internally calculated.
= 3 if SLP1 and SLPN are internally calculated.
YP
Contains values for the second derivative (CURV1DP computes these).
TEMP
Scratch space.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if X values are not strictly increasing.

CURV2DP - interpolate at a specified point

(Double precision version of CURV2)


This function interpolates a value at a specified point using a spline under tension. CURV1DP must be called prior to calling CURV2DP, and the values thus obtained used as input to CURV2DP. CURV2DP returns the interpolated function value at the X-coordinate specified.
------------------------------------------------------------------
                  Argument | Type             |  Mode  | Dimension
------------------------------------------------------------------
FUNCTION CURV2DP (T,       | Double precision | Input  |
                  N,       | Integer          | Input  |
                  X,       | Double precision | Input  | N
                  Y,       | Double precision | Input  | N
                  YP,      | Double precision | Input  | N
                  SIGMA)   | Double precision | Input  | 
------------------------------------------------------------------
T
The abscissa for which an interpolated function value is desired.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input data -- Y(K) is the functional value at X(K) for K=1,N.
YP
Contains values for the second derivative (as calculated by CURV1DP).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVDDP - calculate a derivative at a specified point

(Double precision version of CURVD)


This function calculates a derivative at a specified point using a spline under tension. CURV1DP must be called prior to calling CURVDDP, and the values thus obtained used as input to CURVDDP. The derivative value is returned.
------------------------------------------------------------------
                  Argument | Type             |  Mode  | Dimension
------------------------------------------------------------------
FUNCTION CURVDDP (T,       | Double precision | Input  |
                  N,       | Integer          | Input  |
                  X,       | Double precision | Input  | N
                  Y,       | Double precision | Input  | N
                  YP,      | Double precision | Input  | N
                  SIGMA)   | Double precision | Input  | 
------------------------------------------------------------------
T
The abscissa for which an interpolated function value is desired.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
YP
Contains values for the second derivative (as calculated by CURV1DP).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVIDP - integrate a spline curve

(Double precision version of CURVI)


This function calculates an integral between two specified limits. CURV1DP must be called prior to calling CURVIDP, and the values thus obtained used as input to CURVIDP. The value of the integral is returned.
------------------------------------------------------------------
                  Argument | Type             |  Mode  | Dimension
------------------------------------------------------------------
FUNCTION CURVIDP (XL,      | Double precision | Input  |
                  XU,      | Double precision | Input  |
                  N,       | Integer          | Input  |
                  X,       | Double precision | Input  | N
                  Y,       | Double precision | Input  | N
                  YP,      | Double precision | Input  | N
                  SIGMA)   | Double precision | Input  | 
------------------------------------------------------------------
XL
The lower limit of the integration.
XR
The upper limit of the integration.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
YP
Contains values for the second derivative (as calculated by CURV1DP).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVP1DP - calculate values for CURVP2DP usage

(Double precision version of CURVP1)


This subroutine calculates certain values that are used by CURVP2DP in order to compute an interpolatory spline under tension through a sequence of functional values for a periodic function. The actual computation of the interpolated values must be done using CURVP2DP.
---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL CURVP1DP (N,       | Integer          | Input  |
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               P,       | Double precision | Input  | 
               YP,      | Double precision | Output | N
               TEMP,    | Double precision | Input  | N x 2
               SIGMA,   | Double precision | Input  | 
               IER)     | Integer          | Output | 
---------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function. P must be greater than X(N)-X(1).
YP
Contains values for the second derivative (these are calculated by CURVP1DP).
TEMP
Scratch space.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if P is less than or equal to X(N)-X(1).
= 3 if the X values are not strictly increasing.

CURVP2DP - interpolate a periodic function at a specified point

(Double precision version of CURVP2)


This function interpolates a value at a specified point using a spline under tension. CURVP1DP must be called prior to calling CURVP2DP, and the values thus obtained used as input to CURVP2DP. The interpolated value is returned.
-------------------------------------------------------------------
                   Argument | Type             |  Mode  | Dimension
-------------------------------------------------------------------
FUNCTION CURVP2DP (T,       | Double precision | Input  |
                   N,       | Integer          | Input  |
                   X,       | Double precision | Input  | N
                   Y,       | Double precision | Input  | N
                   P,       | Double precision | Input  |
                   YP,      | Double precision | Input  | N
                   SIGMA)   | Double precision | Input  | 
-------------------------------------------------------------------
T
The abscissa for which an interpolated function value is desired.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values for the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function.
YP
Contains values for the second derivative (as computed by CURVP1DP).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVPIDP - integrate a periodic spline curve

(Double precision version of CURVPI)


This function calculates an integral between two specified limits. CURVP1DP must be called prior to calling CURVPIDP, and the values thus obtained used as input to CURVPIDP. The value of the integral is returned.
------------------------------------------------------------------
                  Argument | Type             |  Mode  | Dimension
------------------------------------------------------------------
FUNCTION CURVIDP (XL,      | Double precision | Input  |
                  XU,      | Double precision | Input  |
                  N,       | Integer          | Input  |
                  X,       | Double precision | Input  | N
                  Y,       | Double precision | Input  | N
                  P,       | Double precision | Input  |
                  YP,      | Double precision | Input  | N
                  SIGMA)   | Double precision | Input  | 
------------------------------------------------------------------
XL
The lower limit of the integration.
XR
The upper limit of the integration.
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function.
YP
Contains values for the second derivative (as calculated by CURVP1DP).
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

CURVSDP - calculate values for a smoothing spline

(Double precision version of CURVS)


This subroutine calculates certain values that are used by CURV2DP in order to compute an interpolatory smoothing spline under tension through a sequence of functional values. The actual computation of the interpolated values must be done using CURV2DP.

Three parameters are used to control the degree of smoothness -- D, S, and EPS.

The parameter D is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of D controls how close the smoothed curve comes to the input data points. If D is small then the interpolated curve will pass close to the input data. The larger the value of D, the more freedom the smooth curve has in how close it comes to the input data values.

S is a more subtle global smoothing parameter. S must be non-negative. For small values of S, the interpolated curve approximates the tension spline and for larger values of S, the curve is smoother. A reasonable value for EPS is REAL(N).

EPS controls the precision to which S is interpreted; EPS must be between 0. and 1. inclusive. A reasonable value for S is SQRT(2./REAL(N)).

--------------------------------------------------------------
              Argument | Type             |  Mode  | Dimension
--------------------------------------------------------------
CALL CURVSDP (N,       | Integer          | Input  |
              X,       | Double precision | Input  | N
              Y,       | Double precision | Input  | N
              D,       | Double precision | Input  | N 
              ISW,     | Integer          | Input  | 
              S,       | Double precision | Input  | 
              EPS,     | Double precision | Input  | 
              YS,      | Double precision | Output | N
              YSP,     | Double precision | Output | N
              SIGMA,   | Double precision | Input  | 
              TEMP,    | Double precision | Input  | N x 9
              IER)     | Integer          | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values for the input function -- Y(K) is the functional value at X(K) for K=1,N.
D
A user-specified value containing the observed weights. D may be either an array or a scalar, depending on the value of ISW (as described below).
ISW
A switch for interpreting the value of D. If ISW=0, then D is an array of length N (D contains an individual error estimate for each input data value); if ISW=1, then D is a scalar that serves as an error estimate for every single data item.
S
Contains the value for smoothing. S must be non-negative. Larger values for S yield greater smoothing. A reasonable value is REAL(N).
EPS
Contains a tolerance value for the relative precision to which S should be interpreted. EPS must be between 0. and 1. inclusive. A reasonable value is SQRT(2./REAL(N)).
YS
An array of length N.
YSP
An array of length N.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
TEMP
Scratch space.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if S is negative.
= 3 if EPS is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if D is negative.

CURVS1DP - calculate values for a smoothing spline in the plane to be used by CURVS2DP

(Double precision version of CURVS1)


This subroutine calculates certain values that are used by CURVS2DP in order to compute an interpolatory smoothing spline under tension through a sequence of functional values in the plane. The actual computation of the interpolated values must be done using CURVS2DP.

Three parameters are used to control the degree of smoothness -- D, S, and EPS.

The parameter D is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of D controls how close the smoothed curve comes to the input data points. If D is small then the interpolated curve will pass close to the input data. The larger the value of D, the more freedom the smooth curve has in how close it comes to the input data values.

S is a more subtle global smoothing parameter. S must be non-negative. For small values of S, the interpolated curve approximates the tension spline and for larger values of S, the curve is smoother. A reasonable value for EPS is REAL(N).

EPS controls the precision to which S is interpreted; EPS must be between 0. and 1. inclusive. A reasonable value for S is SQRT(2./REAL(N)).

---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL CURVS1DP (N,       | Integer          | Input  | 
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               D,       | Double precision | Input  | N or 1 (see desc.)
               ISW,     | Integer          | Input  | 
               S,       | Double precision | Input  | 
               EPS,     | Double precision | Input  | 
               PARAM,   | Double precision | Output | N
               XS,      | Double precision | Output | N
               YS,      | Double precision | Output | N
               XSP,     | Double precision | Output | N
               YSP,     | Double precision | Output | N
               SIGMA,   | Double precision | Input  | 
               TEMP,    | Double precision | Input  | N x 19
               IER)     | Integer          | Output | 
---------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the X-coordinates for the input data. These need not be increasing.
Y
An array containing the Y-coordinates for the input data.
D
A user-specified value containing the observed weights. D may be either an array or a scalar, depending on the value of ISW (as described below). D effectively controls how close the interpolated curve will come to the input points.
ISW
A switch for interpreting the value of D. If ISW=0, then D is an array of length N (D contains an individual error estimate for each input data value); if ISW=1, then D is a scalar that serves as an error estimate for every single data item.
S
Contains the value for smoothing. S must be non-negative. Larger values for S yield greater smoothing. A reasonable value is REAL(N).
EPS
Contains a tolerance value for the relative precision to which S should be interpreted. EPS must be between 0. and 1. inclusive. A reasonable value is SQRT(2./REAL(N)).
XS
An array of length N, contains the smoothed values.
YS
An array of length N, contains the smoothed values.
XSP
An array of length N. Contains second derivative information for the X-coordinate values.
YSP
An array of length N. Contains second derivative information for the Y-coordinate values.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
TEMP
Scratch space.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if S is negative.
= 3 if EPS is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if D is negative.

CURVS2DP - calculate values for a smoothing spline in the plane

(Double precision version of CURVS2)


This subroutine is a companion to CURV1SDP which must be called before calling this subroutine. CURV2SDP calculates an interpolated value for a smoothing spline under tension at a given point.

---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL CURVS2DP (T,       | Double precision | Input  | 
               N,       | Integer          | Input  |
               PARAM,   | Double precision | Input  | N
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               XP,      | Double precision | Input  | N
               YP,      | Double precision | Input  | N
               SIGMA,   | Double precision | Input  | 
               XO,      | Double precision | Output | 
               YO)      | Double precision | Output |
---------------------------------------------------------------
T
A real value to be mapped onto the interpolating curve. Values of T between zero and one interpolate the original data; any values of T outside this range result in extrapolation.
N
The number of points which were specified to determine the curve in CURVS1DP.
PARAM
The arc lengths as computed by CURVS1DP.
X
An array containing the X-coordinates for the input data as input to CURVS1DP. These need not be increasing.
Y
An array containing the Y-coordinates for the input data as input to CURVS1DP.
XP
An array of second derivative values as calculated by CURVS1DP.
YP
An array of second derivative values as calculated by CURVS1DP.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
XO
The interpolated X value.
YO
The interpolated Y value.

CURVPSDP - calculate values for a smoothing spline

(Double precision version of CURVPS)


This subroutine calculates certain values that are used by CURVP2DP in order to compute an interpolatory smoothing spline under tension through a sequence of functional values for a periodic function. The actual computation of the interpolated values must be done using CURVP2DP.

Three parameters are used to control the degree of smoothness -- D, S, and EPS.

The parameter D is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of D controls how close the smoothed curve comes to the input data points. If D is small then the interpolated curve will pass close to the input data. The larger the value of D, the more freedom the smooth curve has in how close it comes to the input data values.

S is a more subtle global smoothing parameter. S must be non-negative. For small values of S, the curve approximates the tension spline and for larger values of S, the curve is smoother. A reasonable value for S is REAL(N).

EPS controls the precision to which S is interpreted; EPS must be between 0. and 1. inclusive. A reasonable value for EPS is SQRT(2./REAL(N)).

---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL CURVPSDP (N,       | Integer          | Input  |
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               P,       | Double precision | Input  |
               D,       | Double precision | Input  | N 
               ISW,     | Integer          | Input  | 
               S,       | Double precision | Input  | 
               EPS,     | Double precision | Input  | 
               YS,      | Double precision | Output | N
               YSP,     | Double precision | Output | N
               SIGMA,   | Double precision | Input  | 
               TEMP,    | Double precision | Input  | N x 11
               IER)     | Integer          | Output | 
---------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the abscissae for the input function.
Y
An array containing the functional values of the input function -- Y(K) is the functional value at X(K) for K=1,N.
P
The period of the function. P must be greater than X(N)-X(1).
D
A user-specified value containing the observed weights. D may either be an array or a scalar, depending on the value of ISW.
ISW
A switch for interpreting the value of D. If ISW=0, then D is an array of length N (an error estimate for each input data value); if ISW=1, then D is a scalar that serves as an error estimate for every single data item.
S
Contains the value for smoothing. S must be non-negative. Larger values for S yield greater smoothing. A reasonable value is REAL(N).
EPS
Contains a tolerance value for the relative precision to which S should be interpreted. EPS must be between 0. and 1. inclusive. A reasonable value is SQRT(2./REAL(N)).
YS
An array of length N.
YSP
An array of length N.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
TEMP
Scratch space.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if S is negative.
= 3 if EPS is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if D is negative.
= 6 if P is less than or equal to X(N)-X(1).

KURV1DP - calculate values for KURV2 usage

(Double precision version of KURV1)


This subroutine calculates certain values that are used by KURV2DP in order to compute an interpolatory spline under tension through a sequence of points in the plane. The actual computation of the interpolated values must be done using KURV2DP.
--------------------------------------------------------------
              Argument | Type             |  Mode  | Dimension
--------------------------------------------------------------
CALL KURV1DP (N,       | Integer          | Input  |
              X,       | Double precision | Input  | N
              Y,       | Double precision | Input  | N
              SLP1,    | Double precision | Input  | 
              SLPN,    | Double precision | Input  | 
              ISLPSW,  | Integer          | Input  |
              XP,      | Double precision | Output | N
              YP,      | Double precision | Output | N
              TEMP,    | Double precision | Input  | N
              S,       | Double precision | Output | N
              SIGMA,   | Double precision | Input  | 
              IER)     | Integer          | Output | 
--------------------------------------------------------------
N
The number of input data values. (N > 1)
X
An array containing the X values of the points.
Y
An array containing the Y values of the points. Adjacent pairs of points must be distinct.
SLP1
A value (in radians) containing the slope at (X(1),Y(1)). The angles are measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 1 to point N. A value for SLP1 may be omitted as indicated by the switch ISLPSW.
SLPN
A value (in radians) containing the slope at (X(N),Y(N)). The angles are measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 1 to point N. A value for SLP2 may be omitted as indicated by the switch ISLPSW.
ISLPSW
A switch to indicate whether the slopes at the end points should be calculated internally.
= 0 if SLP1 and SLPN are user-specified.
= 1 if SLP1 is user-specified, but SLPN calculated internally.
= 2 if SLPN is user-specified, but SLP1 calculated internally.
= 3 if SLP1 and SLPN are internally calculated.
XP
An array of length N.
YP
An array of length N.
TEMP
Scratch space.
S
An array of length N. On output, S contains the polygonal arclengths of the curve.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if a pair of adjacent points coincide.

KURV2DP - does interpolation for parametric curves

(Double precision version of KURV2)


The interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (X[1],Y[1]) and the value 1. is mapped onto (X[N],Y[N]). KURV1DP must be called before calling KURV2DP.
--------------------------------------------------------------
              Argument | Type             |  Mode  | Dimension
--------------------------------------------------------------
CALL KURV2DP (T,       | Double precision | Input  |
              XS,      | Double precision | Output |
              YS,      | Double precision | Output |
              N,       | Integer          | Input  |
              X,       | Double precision | Input  | N
              Y,       | Double precision | Input  | N
              XP,      | Double precision | Input  | N
              YP,      | Double precision | Input  | N
              S,       | Double precision | Input  | N
              SIGMA)   | Double precision | Input  | 
--------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(N),Y(N)). Values outside of [0.,1.] result in extrapolation.
XS
Contains the X coordinate of the interpolated point that T maps to.
YS
Contains the Y coordinate of the interpolated point that T maps to.
N
The number of input data points. (N > 1)
X
An array containing the X values of the input points.
Y
An array containing the Y values of the input points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURV1DP.
YP
An array of length N as computed by KURV1DP.
S
An array of length N containing the polygonal arc lengths of the curve.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

KURVDDP - interpolation and derivatives for parametric curves

(Double precision version of KURVD)


This subroutine behaves like KURV2DP except that in addition it returns the first and second derivatives of the component functions in the parameterization. The interval [0.,1.] maps onto a curve in the plane. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. KURV1DP must be called before calling KURVDDP.
--------------------------------------------------------------
              Argument | Type             |  Mode  | Dimension
--------------------------------------------------------------
CALL KURVDDP (T,       | Double precision | Input  |
              XS,      | Double precision | Output |
              YS,      | Double precision | Output |
              XST,     | Double precision | Output |
              YST,     | Double precision | Output |
              XSTT,    | Double precision | Output |
              YSTT,    | Double precision | Output |
              N,       | Integer          | Input  |
              X,       | Double precision | Input  | N
              Y,       | Double precision | Input  | N
              XP,      | Double precision | Input  | N
              YP,      | Double precision | Input  | N
              S,       | Double precision | Input  | N
              SIGMA)   | Double precision | Input  | 
--------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(N),Y(N)). Values outside of [0.,1.] result in extrapolation.
XS
Contains the X coordinate of the point that T maps to.
YS
Contains the Y coordinate of the point that T maps to.
XST
Contains the first derivatives of the X component with respect to T.
YST
Contains the first derivatives of the Y component with respect to T.
XSTT
Contains the second derivatives of the X component with respect to T.
YSTT
Contains the second derivatives of the X component with respect to T.
N
The number of input data points. (N > 1)
X
An array containing the X values of the input points.
Y
An array containing the Y values of the input points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURV1DP.
YP
An array of length N as computed by KURV1DP.
S
An array of length N containing the polygonal arc lengths of the curve, as computed by KURV1DP.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

KURVP1DP - calculate values for KURVP2 usage

(Double precision version of KURVP1)


This subroutine calculates certain values that are used by KURVP2DP in order to compute an interpolatory spline under tension through a sequence of points in the plane that form a closed curve. The actual computation of the interpolated values must be done using KURVP2DP.
---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL KURVP1DP (N,       | Integer          | Input  |
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               XP,      | Double precision | Output | N
               YP,      | Double precision | Output | N
               TEMP,    | Double precision | Input  | N x 2
               S,       | Double precision | Output | N
               SIGMA,   | Double precision | Input  | 
               IER)     | Integer          | Output | 
---------------------------------------------------------------
N
The number of input data points. (N > 1)
X
An array containing the X values of the points.
Y
An array containing the Y values of the points. Adjacent pairs of points must be distinct.
XP
An array of length N.
YP
An array of length N.
TEMP
Scratch space.
S
An array of length N.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if a pair of adjacent points coincide.

KURVP2DP - does interpolation for closed parametric curves

(Double precision version of KURVP2)


The interpolated curve is parameterized by mapping points in the interval [0.,1.] onto an interpolated closed curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (X[1],Y[1]) and the value 1. is also mapped onto (X[1],Y[1]), since the interpolated curve is closed. KURVP1DP must be called before calling KURVP2DP.
---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL KURVP2DP (T,       | Double precision | Input  |
               XS,      | Double precision | Output |
               YS,      | Double precision | Output |
               N,       | Integer          | Input  |
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               XP,      | Double precision | Input  | N
               YP,      | Double precision | Input  | N
               S,       | Double precision | Input  | N
               SIGMA)   | Double precision | Input  | 
---------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(1),Y(1)), since the interpolated curve is closed. Any interval [TT,TT+1.] maps onto the entire curve.
XS
Contains the X coordinate of the point that T maps to.
YS
Contains the Y coordinate of the point that T maps to.
N
The number of input data points. (N > 1)
X
An array containing the X values of the points.
Y
An array containing the Y values of the points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURV1DP.
YP
An array of length N as computed by KURV1DP.
S
An array of length N containing the polygonal arc lengths of the curve, as computed by KURV1DP.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

KURVPDDP - interpolation and derivatives for closed parametric curves

(Double precision version of KURVPD)


This subroutine behaves like KURVP2DP except that in addition it returns the first and second derivatives of the component functions in the parameterization. The interval [0.,1.] maps onto a closed curve in the plane. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. KURVP1DP must be called before calling KURVPDDP.
---------------------------------------------------------------
               Argument | Type             |  Mode  | Dimension
---------------------------------------------------------------
CALL KURVPDDP (T,       | Double precision | Input  |
               XS,      | Double precision | Output |
               YS,      | Double precision | Output |
               XST,     | Double precision | Output |
               YST,     | Double precision | Output |
               XSTT,    | Double precision | Output |
               YSTT,    | Double precision | Output |
               N,       | Integer          | Input  |
               X,       | Double precision | Input  | N
               Y,       | Double precision | Input  | N
               XP,      | Double precision | Input  | N
               YP,      | Double precision | Input  | N
               S,       | Double precision | Input  | N
               SIGMA)   | Double precision | Input  | 
---------------------------------------------------------------
T
A value to be mapped to a point on the curve. The interval [0.,1.] is mapped onto the curve such that 0. is mapped to (X(1),Y(1)) and 1. is mapped to (X(1),Y(1)). Any interval [TT,TT+1.] maps onto the entire closed curve.
XS
Contains the X coordinate of the point that T maps to.
YS
Contains the Y coordinate of the point that T maps to.
XST
Contains the first derivatives of the X component with respect to T.
YST
Contains the first derivatives of the Y component with respect to T.
XSTT
Contains the second derivatives of the X component with respect to T.
YSTT
Contains the second derivatives of the X component with respect to T.
N
The number of input data points. (N > 1)
X
An array containing the X values of the input points.
Y
An array containing the Y values of the input points. Adjacent pairs of points must be distinct.
XP
An array of length N as computed by KURVP1DP.
YP
An array of length N as computed by KURVP1DP.
S
An array of length N containing the polygonal arc lengths of the curve, as computed by KURVP1DP.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

SURF1DP - calculate values for SURF2DP usage

(Double precision version of SURF1)


This subroutine calculates certain values that are used by SURF2DP in order to compute an interpolatory surface passing through a rectangular grid of function values. The surface computed is a tensor product of splines under tension. To calculate actual interpolated values, SURF2DP must be called.
--------------------------------------------------------------
              Argument | Type             |  Mode  | Dimension
--------------------------------------------------------------
CALL SURF1DP (M,       | Integer          | Input  |
              N,       | Integer          | Input  |
              X,       | Double precision | Input  | M
              Y,       | Double precision | Input  | N
              Z,       | Double precision | Input  | IZ x N
              IZ,      | Integer          | Input  |  
              ZX1,     | Double precision | Input  | N
              ZXM,     | Double precision | Input  | N
              ZY1,     | Double precision | Input  | M
              ZYN,     | Double precision | Input  | M
              ZXY11,   | Double precision | Input  | 
              ZXYM1,   | Double precision | Input  | 
              ZXY1N,   | Double precision | Input  | 
              ZXYMN,   | Double precision | Input  | 
              ISLPSW,  | Integer          | Input  |
              ZP,      | Double precision | Output | M x N x 3
              TEMP,    | Double precision | Input  | N + N + M
              SIGMA,   | Double precision | Input  | 
              IER)     | Integer          | Output | 
--------------------------------------------------------------
M
The number of grid lines in the X direction. (M > 1)
N
The number of grid lines in the Y direction. (N > 1)
X
An array containing M X coordinates for grid lines in the X direction. These values must be strictly increasing.
Y
An array containing N Y coordinates for grid lines in the Y direction. These values must be strictly increasing.
Z
An array containing M x N functional values at the grid points; Z(I,J) contains the functional value at (X(I),Y(J)) for I=1,M and J=1,N.
IZ
The row dimension of the matrix Z (IZ is greater than or equal to M).
ZX1
An array containing N X-partial derivatives of the function along the line X(1), that is ZX1(J) is the X-partial derivative at point (X(1),Y(J)) for J=1,N. This parameter may be defaulted by setting ISLPSW appropriately.
ZXM
An array containing N X-partial derivatives of the function along the line X(M), that is ZXM(J) is the X-partial derivative at point (X(M),Y(J)) for J=1,N. This parameter may be defaulted by setting ISLPSW appropriately.
ZY1
An array containing M Y-partial derivatives of the function along the line Y(1), that is ZY1(I) is the Y-partial derivative at point (X(I),Y(1)) for I=1,M. This parameter may be defaulted by setting ISLPSW appropriately.
ZYN
An array containing M Y-partial derivatives of the function along the line Y(N), that is ZY1(I) is the Y-partial derivative at point (X(I),Y(N)) for I=1,M. This parameter may be defaulted by setting ISLPSW appropriately.
ZXY11
The X-Y-partial derivative at (X(1),Y(1). This parameter may be defaulted by setting ISLPSW appropriately.
ZXYM1
The X-Y-partial derivative at (X(M),Y(1). This parameter may be defaulted by setting ISLPSW appropriately.
ZXY1N
The X-Y-partial derivative at (X(1),Y(N). This parameter may be defaulted by setting ISLPSW appropriately.
ZXYMN
The X-Y-partial derivative at (X(M),Y(N). This parameter may be defaulted by setting ISLPSW appropriately.
ISLPSW
A switch to indicate which boundary derivatives are user supplied and which should be estimated internally. Where

I1 = 0 if ZX1 is user-supplied and 1 otherwise.
I2 = 0 if ZXM is user-supplied and 1 otherwise.
I3 = 0 if ZY1 is user-supplied and 1 otherwise.
I4 = 0 if ZYN is user-supplied and 1 otherwise.
I5 = 0 if ZXY11 is user-supplied and 1 otherwise.
I6 = 0 if ZXYM1 is user-supplied and 1 otherwise.
I7 = 0 if ZXY1N is user-supplied and 1 otherwise.
I8 = 0 if ZXYMN is user-supplied and 1 otherwise.

set ISLPSW = I1 + 2*I2 + 4*I3 +8*I4 +16*I5 +32*I6 + 64*I7 + 128*I8. Then, for example, if ISLPSW=0, then all derivative information is user-supplied and if ISLPSW=255, then all derivative information is to be internally estimated.

ZP
An array of size M x N x 3. On output this contains partial derivatives of the surface at the given nodes. ZP is used by SURF2DP.
TEMP
Scratch space.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.
IER
An error return value. If IER is returned as 0, then no errors were detected.
= 1 if N is less than 2.
= 2 if X or Y values are not strictly increasing.

SURF2DP - 2D interpolation for gridded data

(Double precision version of SURF2)


This function interpolates a surface value at a specified coordinate using bi-splines under tension. SURF1DP must be called before invoking SURF2DP. The desired interpolated value is returned as the value of the function.
------------------------------------------------------------------
                  Argument | Type             |  Mode  | Dimension
------------------------------------------------------------------
FUNCTION SURF2DP (XX,      | Double precision | Input  |
                  YY,      | Double precision | Input  |
                  M,       | Integer          | Input  |
                  N,       | Integer          | Input  |
                  X,       | Double precision | Input  | M
                  Y,       | Double precision | Input  | N
                  Z,       | Double precision | Input  | IZ x N
                  IZ,      | Integer          | Input  |  
                  ZP,      | Double precision | Input  | M x N x 3
                  SIGMA)   | Double precision | Input  | 
------------------------------------------------------------------
XX
Contains the X coordinate of a point to be mapped onto the interpolated surface.
YY
Contains the Y coordinate of a point to be mapped onto the interpolated surface.
M
The number of grid lines in the X direction. (M > 1)
N
The number of grid lines in the Y direction. (N > 1)
X
An array containing M X coordinates for grid lines in the X direction. These values must be strictly increasing.
Y
An array containing N Y coordinates for grid lines in the Y direction. These values must be strictly increasing.
Z
An array containing M x N functional values at the grid points; Z(I,J) contains the functional value at (X(I),Y(J)) for I=1,M and J=1,N.
IZ
The row dimension of the matrix Z (IZ is greater than or equal to M).
ZP
An array of size M x N x 3.
SIGMA
Tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. Values of SIGMA larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

c_ftcurv - 1D interpolation for non-periodic functions


This function calculates an interpolatory spline under tension through a sequence of functional values.

c_ftcurv is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurv are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftcurv (int, float [], float [], int, float [], float []);
Return value:

c_ftcurv returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if X values are not strictly increasing.

Argument description:

-------------------------------------------------
              Argument | Type     |  Size
-------------------------------------------------
int c_ftcurv (n,       | int      |
              xi,      | float [] | n
              yi,      | float [] | n
              m,       | int      | 
              xo,      | float [] | m
              yo       | float [] | m
             );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function -- yi[k] is the functional value at xi[k] for k=0,n-1.
m
The number of desired interpolated values.
xo
An array of length m containing the abscissae for the interpolated values.
yo
An array containing the interpolated functional values -- yo[k] is the functional value at xo[k] for k=0,m-1.

c_ftcurvd - calculate derivatives


This function calculates the derivatives of an interpolatory spline under tension.

c_ftcurvd is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvd are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftcurvd (int, float [], float [], int, float [], float []);
Return value:

c_ftcurvd returns an error value as per:

= 0 -- no error.
= 1 -- if N is less than 2.
= 2 -- if X values are not strictly increasing.

Argument description:

-------------------------------------------------
               Argument | Type     |  Size
-------------------------------------------------
int c_ftcurvd (n,       | int      |
               xi,      | float [] | n
               yi,      | float [] | n
               m,       | int      | 
               xo,      | float [] | m
               yo       | float [] | m
              );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n).
m
The number of desired derivatives.
xo
An array containing the abscissae for the output points.
yo
An array containing the interpolated derivative values -- yo[k] is the functional derivative at xo[k] for k=0,n.

c_ftcurvi - calculate integrals


This function calculates integrals of an interpolatory spline under tension between two user-specified limits.

c_ftcurvi is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvd are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftcurvi (float, float, int, float [], float [], float *);
Return value:

c_ftcurvi returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if X values are not strictly increasing.

Argument description:

-------------------------------------------------
               Argument | Type     |  Size
-------------------------------------------------
int c_ftcurvi (xl,      | float    |
               xr,      | float    |
               n,       | int      | 
               xi,      | float [] | n
               yi,      | float [] | n
               integral | float *  | 
              );
-------------------------------------------------
xl
The lower limit of the integration.
xr
The upper limit of the integration.
n
The number of input data points. (N > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function (y[k] is the functional value at x[k] for k=0,n).
integral
The integral of the function from xl to xr is given by *integral.

c_ftcurvp - 1D interpolation for periodic functions


This function calculates an interpolatory spline under tension through a sequence of functional values for a periodic function.

c_ftcurvp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. The only control parameter that applies to c_ftcurvp is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftcurvp (int, float [], float [], float, int, float [], float []);
Return value:

c_ftcurvp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if the period is strictly less than the span of the abscissae.

Argument description:

-------------------------------------------------
               Argument | Type     |  Size
-------------------------------------------------
int c_ftcurvp (n,       | int      |
               xi,      | float [] | n
               yi,      | float [] | n
               p,       | float    |
               m,       | int      | 
               xo,      | float [] | m
               yo       | float [] | m
              );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the input functional values (y[k] is the functional value at x[k] for k=0,n).
p
The period of the function; p must not be less than xi[n-1] - xi[0].
m
The number of desired interpolated points.
xo
An array containing the abscissae for the interpolated values.
yo
An array containing the interpolated functional values (yo[k] is the functional value at xo[k] for k=0,n).

c_ftcurvpi - calculate integrals for periodic functions


This function calculates an integral between two specified points.

c_ftcurvpi is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. The only control parameter that applies to c_ftcurvpi is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftcurvpi (float, float, float, int, float [], float [], float *);
Return value:

c_ftcurpi returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if the period is strictly less than the span of the abscissae.

Argument description:

-------------------------------------------------
                Argument | Type     |  Size
-------------------------------------------------
int c_ftcurvpi (xl,      | float    |
                xr,      | float    |
                p,       | float    |
                m,       | int      | 
                xi,      | float [] | m
                yi,      | float [] | m
                integral | float *  |
               );
-------------------------------------------------
xl
The lower limit of the integration.
xr
The upper limit of the integration.
p
The period of the function; p must not be less than xi[n-1] - xi[0].
m
The number of input points.
xi
An array containing the abscissae for the input points.
yi
An array containing the values of the input points (yi[k] is the functional value at xi[k] for k=0,m-1).
integral
The desired integral value is returned in *integral.

c_ftcurvs - smoothing spline


This function computes an interpolatory smoothing spline under tension through a sequence of functional values.

Two parameters and one function argument used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.

The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it comes to the input data values.

The parameter smt is a more subtle global smoothing parameter; smt must be non-negative. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n.

The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps is sqrt( 2./(float) n ).

c_ftcurvs is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvs are: sig, smt, eps, sf2.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

   int c_ftcurvs (int, float [], float [], int, float [], int, 
                  float [], float []);
Return value:

c_ftcurvs returns an error value as per:

= 1 if N is less than 2.
= 2 if smt is negative.
= 3 if eps is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if d is negative.

Argument description:

--------------------------------------------------------------
               Argument | Type     |  Size
--------------------------------------------------------------
int c_ftcurvs (n,       | int      |
               xi,      | float [] | n
               yi,      | float [] | n
               dflg,    | int      |
               d,       | float [] | n
               m,       | int      |  
               xo,      | float [] | m
               yo       | float [] | m
              );
--------------------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function (yi[k] is the functional value at x[k] for k=0,n-1).
dflg
A switch for interpreting the value of d (as described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
d
A user-specified value containing the observed weights. d may either be an array or a scalar, depending on the value of dflg.
m
The number of output values.
xo
Contains the abscissae for the output values.
yo
Contains the functional values for the smoothing spline ((yo[k] is the functional value at xo[k] for k=0,n-1).

c_ftcurvs1 - calculate values for a smoothing spline for data in the plane.


This function computes an interpolatory smoothing spline under tension through a sequence of values in the plane.

Two parameters and one function argument are used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.

The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it comes to the input data values.

The parameter smt is a more subtle global smoothing parameter; smt must be non-negative. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n.

The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps is sqrt( 2./(float) n ).

c_ftcurvs1 is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvs1 are: sig, smt, eps, sf2.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

     int c_ftcurvs1(int n, float xi[], float yi[], int dflg,
                    float d[], int m, float xl, float xr,
                    float xo[], float yo[])

Return value:

c_ftcurvs returns an error value as per:

= 1 if N is less than 2.
= 2 if smt is negative.
= 3 if eps is negative or greater than 1.
= 5 if d is negative.

Argument description:

--------------------------------------------------------------
                Argument | Type     |  Size
--------------------------------------------------------------
int c_ftcurvs1 (n,       | int      |
                xi,      | float [] | n
                yi,      | float [] | n
                dflg,    | int      |
                d,       | float [] | n
                m,       | int      |  
                xl,      | float    |
                xr,      | float    |
                xo,      | float [] | m
                yo       | float [] | m
               );
--------------------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the X-coordinates for the input data. These need not be increasing.
yi
An array containing the Y-coordinates for the input data.
dflg
A switch for interpreting the value of d (as described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
d
A user-specified value containing the observed weights. d may either be an array or a scalar, depending on the value of dflg.
m
The number of output values.
xl
A lower limit for an interval of interpolation. The interval [xl,xr] is divided into m equal values to produce the interpolated curve.
xr
An upper limit for an interval of interpolation. The interval [xl,xr] is divided into m equal values to produce the interpolated curve.
xo
The interpolated X values.
yo
The interpolated Y values.

c_ftcurvps - smoothing spline for periodic functions


This function computes an interpolatory smoothing spline under tension through a sequence of functional values for a periodic function.

Two parameters and one function argument used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.

The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it must come to the input data values.

The parameter smt is a more subtle global smoothing parameter; smt must be positive. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n.

The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps sqrt( 2./(float) n ).

c_ftcurvps is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvps are: sig, smt, eps, sf2.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

   int c_ftcurvps (int, float [], float [], float, int, float [], int, 
                  float [], float []);
Return value:

c_ftcurvps returns an error value as per:

= 1 if N is less than 2.
= 2 if smt is negative.
= 3 if eps is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if d is negative.

Argument description:

--------------------------------------------------------------
                Argument | Type     |  Size
--------------------------------------------------------------
int c_ftcurvps (n,       | int      |
                xi,      | float [] | n
                yi,      | float [] | n
                p,       | float    |
                dflg,    | int      |
                d,       | float [] | n
                m,       | m        |  
                xo,      | float [] | m
                yo       | float [] | m
               );
--------------------------------------------------------------
n
The number of input data values. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function (yi[k] is the functional value at x[k] for k=0,n-1).
p
The period of the function.
dflg
A switch for interpreting the value of the argument d (described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
d
A user-specified value containing the observed weights. d may either be an array or a scalar, depending on the value of dflg.
m
The number of output values.
xo
Contains the abscissae for the output values.
yo
Contains the functional values for the smoothing spline ((yo[k] is the functional value at xo[k] for k=0,m-1).

c_ftkurv - interpolation for parametric curves


This function calculates an interpolatory spline under tension through a sequence of points in the plane.

Given a sequence of input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[n-1],y[n-1]).

c_ftkurv is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftkurv are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The value for parameter sl1 is in radians and contains the slope at (x[0],y[0]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sl1 may be omitted as indicated by the switch sf1.

The value for parameter sln is in radians and contains the slope at (x[n-1],y[n-1]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sln may be omitted as indicated by the switch sf1.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftkurv (int, float [], float [], int, float [], float [], float []);
Return value:

c_ftkurv returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
              Argument | Type     |  Size
-------------------------------------------------
int c_ftkurv (n,       | int      |
              xi,      | float [] | n
              yi,      | float [] | n
              m,       | int      | 
              t,       | float [] | m
              xo,      | float [] | m
              yo       | float [] | m
             );
-------------------------------------------------
n
The number of input data values. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n-1).
m
The number of desired interpolated values.
t
Contains an array of values for the parameter mapping onto the interpolated curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,m-1.
yo
An array containing the Y values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,m-1.

c_ftkurvp - interpolation for closed parametric curves


This procedure calculates an interpolatory spline under tension through a sequence of points in the plane forming a closed curve.

Given a sequence of distinct input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[0],y[0]) as well (completing the closed curve).

c_ftkurvp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. The only control parameter that applies to c_ftkurvp is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftkurvp (int, float [], float [], int, float [], float [], float []);
Return value:

c_ftkurvp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
              Argument | Type     |  Size
-------------------------------------------------
int c_ftkurv (n,       | int      |
              xi,      | float [] | n
              yi,      | float [] | n
              m,       | int      | 
              t,       | float [] | m
              xo,      | float [] | m
              yo       | float [] | m
             );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n-1).
m
The number of desired interpolated points.
t
Contains an array of values for the parameter mapping onto the interpolated curve. Any interval [tt,tt+1.] maps onto the entire curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,n-1.
yo
An array containing the Y values for the interpolated points.

c_ftkurvd - calculate interpolated values and derivatives for parametric curves


This procedure behaves like c_ftkurv except that in addition it returns the first and second derivatives of the component functions in the parameterization.

Given a sequence of input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[n-1],y[n-1]).

c_ftkurvd is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftkurvd are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The value for parameter sl1 is in radians and contains the slope at (x[0],y[0]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sl1 may be omitted as indicated by the switch sf1.

The value for parameter sln is in radians and contains the slope at (x[n-1],y[n-1]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sln may be omitted as indicated by the switch sf1.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sln is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftkurvd (int, float [], float [], int, float [], float [], float [],
                  float [], float [], float [], float []);
Return value:

c_ftkurvd returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
               Argument | Type     |  Size
-------------------------------------------------
int c_ftkurvd (n,       | int      |
               xi,      | float [] | n
               yi,      | float [] | n
               m,       | int      | 
               t,       | float [] | m
               xo,      | float [] | m
               yo,      | float [] | m
               xd,      | float [] | m
               yd,      | float [] | m
               xdd,     | float [] | m
               ydd      | float [] | m
              );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n).
m
The number of desired interpolated points.
t
Contains an array of values for the parameter mapping onto the interpolated curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,n-1.
yo
An array containing the Y values for the interpolated points.
xd
Contains the first derivatives of the X component with respect to t.
yd
Contains the first derivatives of the Y component with respect to t.
xdd
Contains the second derivatives of the X component with respect to t.
ydd
Contains the second derivatives of the Y component with respect to t.

c_ftkurvpd - interpolation and derivative calculation for closed parametric curves


This procedure behaves like c_ftkurvp except that in addition it returns the first and second derivatives of the component functions in the parameterization.

Given a sequence of distinct input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[0],y[0]) as well (completing the closed curve).

c_ftkurvpd is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. The only control parameter that applies to c_ftkurvpd is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftkurvpd (int, float [], float [], int, float [], float [], float [],
                  float [], float [], float [], float []);
Return value:

c_ftkurvpd returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
                Argument | Type     |  Size
-------------------------------------------------
int c_ftkurvpd (n,       | int      |
                xi,      | float [] | n
                yi,      | float [] | n
                m,       | int      | 
                t,       | float [] | m
                xo,      | float [] | m
                yo       | float [] | m
                xd,      | float [] | m
                yd       | float [] | m
                xdd,     | float [] | m
                ydd      | float [] | m
               );
-------------------------------------------------
n
The number of input data values. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n-1).
m
The number of desired interpolated points.
t
Contains an array of values for the parameter mapping onto the interpolated curve. Any interval [tt,tt+1.] maps onto the entire curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,n-1.
yo
An array containing the Y values for the interpolated points.
xd
Contains the first derivatives of the X component with respect to t.
yd
Contains the first derivatives of the Y component with respect to t.
xdd
Contains the second derivatives of the X component with respect to t.
ydd
Contains the second derivatives of the Y component with respect to t.

c_ftsurf - 2D tension spline interpolation of rectangular data


This procedure calculates an interpolatory surface passing through a rectangular grid of function values. The surface computed is a tensor product of splines under tension.

c_ftsurf is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc, c_ftsetfa. The control parameters that apply to c_ftsurf are: sig, zx1, zxm, zy1, zyn, z11, zm1, z1n, zmn, df1, df2, df3, df4, df5, df6, df7, df8

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

zx1 is an array containing ni X-partial derivatives of the function along the line xi[0], that is zx1[j] is the X-partial derivative at point (x[0],y[j]) for j=0,ni-1. This parameter may be defaulted by setting the value for df1 appropriately. The default is to compute zx1 internally. Values for zx1 can be set using the procedure c_ftsetfa.

zxm is an array containing ni X-partial derivatives of the function along the line xi[mi-1], that is zxm[j] is the X-partial derivative at point (xi[mi-1],yi[j]) for j=0,ni-1. This parameter may be defaulted by setting the value for df2 appropriately. The default is to compute zx2 internally. Values for zxm can be set using the procedure c_ftsetfa.

zy1 is an array containing mi Y-partial derivatives of the function along the line yi[0], that is zy1[j] is the Y-partial derivative at point (x[i],y[0]) for i=0,mi-1. This parameter may be defaulted by setting the value for df3 appropriately. The default is to compute zy1 internally. Values for zy1 can be set using the procedure c_ftsetfa.

zyn is an array containing mi Y-partial derivatives of the function along the line yi[ni-1], that is zyn[j] is the Y-partial derivative at point (x[i],y[ni-1]) for i=0,mi-1. This parameter may be defaulted by setting the value for df4 appropriately. The default is to compute zyn internally. Values for zyn can be set using the procedure c_ftsetfa.

z11, zm1, z1n, zmn specify X-Y-partial derivatives of the function at the four corners (xi[0],yi[0]), (xi[mi-1],yi[0]), (xi[0],yi[ni-1]), (xi[mi-1],yi[ni-1]), These parameters may be defaulted by setting the values for df5, df6, df7, df8, appropriately. The default is to compute z11, zm1, z1n, zmn internally.

Function prototype:

  float *c_ftsurf (int, int, float *, float *, float *, 
                   int, int, float *, float *, int *);
Return value:

c_ftsurf returns a pointer to an array containing mo x no floats which are the interpolated values on the grid specified by the arrays xo and yo.

Argument description:

---------------------------------------------------------------
                 Argument | Type     |  Size
---------------------------------------------------------------
float *c_ftsurf (mi,      | int      |
                 ni,      | int      |
                 xi,      | float *  | pointer to m floats
                 yi,      | float *  | pointer to n floats
                 zi,      | float *  | pointer to m * n floats
                 mo,      | int      |
                 no,      | int      |
                 xo,      | float *  | pointer to mo floats
                 yo,      | float *  | pointer to no floats
                 ier      | int *    |
                );
---------------------------------------------------------------
mi
The number of grid lines in the X direction. (mi > 1)
ni
The number of grid lines in the Y direction. (ni > 1)
xi
Pointer to an array containing mi X coordinates for grid lines in the X direction.
yi
Pointer to an array containing ni Y coordinates for grid lines in the Y direction.
zi
Pointer to mi x ni floats which are the functional values at the grid points defined by xi and yi.
mo
The number of output values in the X direction.
no
The number of output values in the Y direction.
xo
Pointer to an array containing mo X coordinates for grid lines in the X direction in the output interpolation grid.
xo
Pointer to an array containing no Y coordinates for grid lines in the Y direction in the output interpolation grid.
ier
The value *ier is an error flag as per:
= 0 -- no error.
= 1 -- if n is less than 2 or m is less than 2.
= 2 -- if X or Y values are not strictly increasing.

c_ftseti - Set int valued parameters


c_ftseti is used to set values for any of the control parameters that take int values. The values set by c_ftseti remain in effect until changed by subsequent calls to c_ftseti.

Function prototype:

  void c_ftseti(char *, int);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
void c_ftseti (pnam,   | char *  |        
               ival);  | int     |
-------------------------------------------
pnam
The name of the control parameter to be assigned an int value.
ival
The value to be assigned to the control parameter whose name is pointed to by pnam.

c_ftgeti - Retrieve an int valued parameter


c_ftgeti is called to obtain current values for any of the int valued control parameters.

Function prototype:

  void c_ftgeti(char *, int *);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
void c_ftgeti (pnam,   | char *  |        
               ival);  | int  *  |
-------------------------------------------
pnam
The name of the control parameter whose value is to be retrieved.
ival
*ival will be the value currently assigned to the control parameter whose name is pointed to by pnam.

c_ftsetr - Set float valued parameters


c_ftsetr is used to set values for any of the control parameters that take float or double values. The values set by c_ftsetr remain in effect until changed by subsequent calls to c_ftsetr or c_ftsetrd.

Function prototype:

  void c_ftsetr(char *, float);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
void c_ftsetr (pnam,   | char *  |        
               fval);  | float   |
-------------------------------------------
pnam
The name of the control parameter to be assigned a float value.
fval
The value to be assigned to the control parameter whose name is pointed to by pnam.

c_ftgetr - Retrieve a float valued parameter


c_ftgetr is called to obtain current values for any of the control parameters that accept float or double values.

Function prototype:

  void c_ftgetr(char *, float *);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
void c_ftgetr (pnam,   | char *  |        
               fval);  | float * |
-------------------------------------------
pnam
The name of the control parameter whose value is to be retrieved.
fval
*fval will be the value currently assigned to the control parameter whose name is pointed to by pnam.

c_ftsetrd - Set double valued parameters


c_ftsetrd is used to set values for any of the control parameters that take float or double values. The values set by c_ftsetrd remain in effect until changed by subsequent calls to c_ftsetrd or c_ftsetr.

Function prototype:

  void c_ftsetrd(char *, double);
Argument description:
-------------------------------------------
               Argument | Type    |  Size  
-------------------------------------------
void c_ftsetrd (pnam,   | char *  |        
                dval);  | double  |
-------------------------------------------
pnam
The name of the control parameter to be assigned a double value.
dval
The value to be assigned to the control parameter whose name is pointed to by pnam.

c_ftgetrd - Retrieve a double valued parameter


c_ftgetrd is called to obtain current values for any of the control parameters that accept float or double values.

Function prototype:

  void c_ftgetrd(char *, double *);
Argument description:
-------------------------------------------
               Argument | Type     | Size  
-------------------------------------------
void c_ftgetrd (pnam,   | char *   |        
                dval);  | double * |
-------------------------------------------
pnam
The name of the control parameter whose value is to be retrieved.
dval
*dval will be the value currently assigned to the control parameter whose name is pointed to by pnam.

c_ftsetc - Set char valued parameters


c_ftsetc is used to set values for any of the control parameters that take string values. The values set by c_ftsetc remain in effect until changed by subsequent calls to c_ftsetc.

Function prototype:

  void c_ftsetc(char *, char *);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
void c_ftsetc (pnam,   | char *  |        
               cval);  | char *  |
-------------------------------------------
pnam
The name of the control parameter to be assigned a char value.
cval
The value to be assigned to the control parameter whose name is pointed to by pnam.

c_ftgetc - Retrieve a char valued parameter


c_ftgetc is called to obtain current values for any of the string valued control parameters.

Function prototype:

  void c_ftgetc(char *, char *);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
void c_ftgetc (pnam,   | char *  |        
               cval);  | char *  |
-------------------------------------------
pnam
The name of the control parameter whose value is to be retrieved.
cval
cval will point to a string containing the returned value. The user is required to reserve enough space to store the string.

c_ftsetfa - Set float valued array parameters


c_ftsetfa is used to set values for any of the control parameters that take float arrays. The values set by c_ftsetfa remain in effect until changed by subsequent calls to c_ftsetfa or or c_ftsetda.

Function prototype:

  int c_ftsetfa(char *pnam, int n, float *far);
Argument description:
-------------------------------------------
              Argument | Type    |  Size  
-------------------------------------------
int c_ftsetfa (pnam,   | char *  |        
               n,      | int     |
               far);   | float * |
-------------------------------------------
pnam
The name of the control parameter to be assigned float array values.
n
The number of float values in the array.
far
A pointer to the n-element input array.

c_ftsetda - Set double valued array parameters


c_ftsetda is used to set values for any of the control parameters that take double arrays. The values set by c_ftsetda remain in effect until changed by subsequent calls to c_ftsetda or c_ftsetfa.

Function prototype:

  int c_ftsetda(char *pnam, int n, float *dar);
Argument description:
-------------------------------------------
              Argument | Type     |  Size  
-------------------------------------------
int c_ftsetda (pnam,   | char *   |        
               n,      | int      |
               dar);   | double * |
-------------------------------------------
pnam
The name of the control parameter to be assigned double array values.
n
The number of double values in the array.
dar
A pointer to the n-element input array.

c_ftgetfa_size - Retrieve the size of an array


c_ftgetfa_size is called to obtain current sizes for any of the float or double valued control parameters.

Function prototype:

  int c_ftgetfa_size(char *);
Return value:

c_ftgetfa_size returns the size of the array (or returns a zero if an error occurs).

Argument description:

----------------------------------------------
                  Argument | Type    |  Size  
----------------------------------------------
int c_ftgetfa_size (pnam   | char *  |
                    );     |         |        
----------------------------------------------
pnam
The name of the control parameter whose value is to be retrieved.

c_ftgetfa_data - Retrieve array values


c_ftgetfa_data is called to obtain current values for any of the float valued array control parameters.

Function prototype:

  float *c_ftgetfa_data(char *);
Return value:

c_ftgetfa_data returns a pointer to an array of data (or returns a -1 if an error occurs). The size of the array can be obtained by using c_ftgetfa_size.

Argument description:

------------------------------------------------
                      Argument | Type    |  Size  
------------------------------------------------
float *c_ftgetfa_data (pnam)   | char *  |        
------------------------------------------------
pnam
The name of the control parameter whose values are to be retrieved.

c_ftgetda_data - Retrieve array values


c_ftgetda_data is called to obtain current values for any of the double valued array control parameters.

Function prototype:

  float *c_ftgetda_data(char *);
Return value:

c_ftgetda_data returns a pointer to an array of data (or returns a -1 if an error occurs). The size of the array can be obtained by using c_ftgetfa_size.

Argument description:

------------------------------------------------
                       Argument | Type    | Size  
------------------------------------------------
double *c_ftgetda_data (pnam)   | char *  |        
------------------------------------------------
pnam
The name of the control parameter whose values are to be retrieved.

c_ftcurvdp - 1D interpolation for non-periodic functions

(Double precision version of c_ftcurvdp)


This function calculates an interpolatory spline under tension through a sequence of functional values.

c_ftcurvdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvdp are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftcurvdp (int, double [], double [], int, double [], double []);
Return value:

c_ftcurvdp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if X values are not strictly increasing.

Argument description:

-------------------------------------------------
              Argument | Type      |  Size
-------------------------------------------------
int c_ftcurvdp (n,     | int       |
                xi,    | double [] | n
                yi,    | double [] | n
                m,     | int       | 
                xo,    | double [] | m
                yo     | double [] | m
               );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function -- yi[k] is the functional value at xi[k] for k=0,n-1.
m
The number of desired interpolated values.
xo
An array containing the abscissae for the interpolated values.
yo
An array containing the interpolated functional values -- yo[k] is the functional value at xo[k] for k=0,n.

c_ftcurvddp - calculate derivatives

(Double precision version of c_ftcurvd)


This function calculates the derivatives of an interpolatory spline under tension.

c_ftcurvddp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetrd, c_ftsetc. Control parameters that apply to c_ftcurvddp are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftcurvddp (int, double [], double [], int, double [], double []);
Return value:

c_ftcurvddp returns an error value as per:

= 0 -- no error.
= 1 -- if N is less than 2.
= 2 -- if X values are not strictly increasing.

Argument description:

-------------------------------------------------
               Argument | Type      |  Size
-------------------------------------------------
int c_ftcurvddp (n,     | int       |
                 xi,    | double [] | n
                 yi,    | double [] | n
                 m,     | int       | 
                 xo,    | double [] | m
                 yo     | double [] | m
                );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n).
m
The number of desired derivatives.
xo
An array containing the abscissae for the output points.
yo
An array containing the interpolated derivative values -- yo[k] is the functional derivative at xo[k] for k=0,n.

c_ftcurvidpdp - calculate integrals

(Double precision version of c_ftcurvidp)


This function calculates integrals of an interpolatory spline under tension between two user-specified limits.

c_ftcurvidp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftcurvddp are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The values for sl1 and sln specify the slope of the curve at the first point and last point, respectively.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftcurvidp (double, double, int, double [], double [], double *);
Return value:

c_ftcurvidp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if X values are not strictly increasing.

Argument description:

-------------------------------------------------
                 Argument | Type      |  Size
-------------------------------------------------
int c_ftcurvidp (xl,      | double    |
                 xr,      | double    |
                 n,       | int       | 
                 xi,      | double [] | n
                 yi,      | double [] | n
                 integral | double *  | 
                );
-------------------------------------------------
xl
The lower limit of the integration.
xr
The upper limit of the integration.
n
The number of input data points. (N > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function (y[k] is the functional value at x[k] for k=0,n).
integral
The integral of the function from xl to xr is given by *integral.

c_ftcurvpdp - 1D interpolation for periodic functions

(Double precision version of c_ftcurvp)


This function calculates an interpolatory spline under tension through a sequence of functional values for a periodic function.

c_ftcurvpdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. The only control parameter that applies to c_ftcurvpdp is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftcurvpdp (int, double [], double [], double, int, double [], 
                   double []);
Return value:

c_ftcurvpdp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if the period is strictly less than the span of the abscissae.

Argument description:

-------------------------------------------------
               Argument | Type      |  Size
-------------------------------------------------
int c_ftcurvpdp (n,     | int       |
                 xi,    | double [] | n
                 yi,    | double [] | n
                 p,     | double    |
                 m,     | int       | 
                 xo,    | double [] | m
                 yo     | double [] | m
                );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the input functional values (y[k] is the functional value at x[k] for k=0,n).
p
The period of the function; p must not be less than xi[n-1] - xi[0].
m
The number of desired interpolated points.
xo
An array containing the abscissae for the interpolated values.
yo
An array containing the interpolated functional values (yo[k] is the functional value at xo[k] for k=0,n).

c_ftcurvpidp - calculate integrals for periodic functions

(Double precision version of c_ftcurvpi)


This function calculates an integral between two specified points.

c_ftcurvpidp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. The only control parameter that applies to c_ftcurvpidp is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftcurvpidp (double, double, double, int, double [], double [], 
                    double *);
Return value:

c_ftcurpidp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if the period is strictly less than the span of the abscissae.

Argument description:

-------------------------------------------------
                Argument   | Type      |  Size
-------------------------------------------------
int c_ftcurvpidp (xl,      | double    |
                  xr,      | double    |
                  p,       | double    |
                  m,       | int       | 
                  xi,      | double [] | m
                  yi,      | double [] | m
                  integral | double *  |
                 );
-------------------------------------------------
xl
The lower limit of the integration.
xr
The upper limit of the integration.
p
The period of the function; p must not be less than xi[n-1] - xi[0].
m
The number of input points.
xi
An array containing the abscissae for the input points.
yi
An array containing the values of the input points (yi[k] is the functional value at xi[k] for k=0,n).
integral
The desired integral value is returned in *integral.

c_ftcurvsdp - smoothing spline

(Double precision version of c_ftcurvs)


This function computes an interpolatory smoothing spline under tension through a sequence of functional values.

Two parameters and one function argument used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.

The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it comes to the input data values.

The parameter smt is a more subtle global smoothing parameter; smt must be non-negative. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n.

The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps is sqrt( 2./(float) n ).

c_ftcurvsdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftcurvsdp are: sig, smt, eps, sf2.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

   int c_ftcurvsdp (int, double [], double [], int, double [], int, 
                    double [], double []);
Return value:

c_ftcurvsdp returns an error value as per:

= 1 if N is less than 2.
= 2 if smt is negative.
= 3 if eps is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if d is negative.

Argument description:

--------------------------------------------------------------
               Argument | Type      |  Size
--------------------------------------------------------------
int c_ftcurvsdp (n,     | int       |
                 xi,    | double [] | n
                 yi,    | double [] | n
                 dflg,  | int       |
                 d,     | double [] | n
                 m,     | int       |  
                 xo,    | double [] | m
                 yo     | double [] | m
                );
--------------------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function (yi[k] is the functional value at x[k] for k=0,n-1).
dflg
A switch for interpreting the value of d (as described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
d
A user-specified value containing the observed weights. d may either be an array or a scalar, depending on the value of dflg.
m
The number of output values.
xo
Contains the abscissae for the output values.
yo
Contains the functional values for the smoothing spline ((yo[k] is the functional value at xo[k] for k=0,n-1).

c_ftcurvs1dp - calculate values for a smoothing spline for data in the plane.

(Double precision version of c_ftcurvs1)


This function computes an interpolatory smoothing spline under tension through a sequence of values in the plane.

Two parameters and one function argument are used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.

The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it comes to the input data values.

The parameter smt is a more subtle global smoothing parameter; smt must be non-negative. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n.

The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps is sqrt( 2./(float) n ).

c_ftcurvs1dp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftcurvs1dp are: sig, smt, eps, sf2.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

     int c_ftcurvs1dp(int n, double xi[], double yi[], int dflg,
                      double d[], int m, double xl, double xr,
                      double xo[], double yo[])
Return value:

c_ftcurvsdp returns an error value as per:

= 1 if N is less than 2.
= 2 if smt is negative.
= 3 if eps is negative or greater than 1.
= 5 if d is negative.

Argument description:

--------------------------------------------------------------
                Argument | Type      |  Size
--------------------------------------------------------------
int c_ftcurvs1dp (n,     | int       |
                  xi,    | double [] | n
                  yi,    | double [] | n
                  dflg,  | int       |
                  d,     | double [] | n
                  m,     | int       |  
                  xl,    | double    |
                  xr,    | double    |
                  xo,    | double [] | m
                  yo     | double [] | m
                 );
--------------------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the X-coordinates for the input data. These need not be increasing.
yi
An array containing the Y-coordinates for the input data.
dflg
A switch for interpreting the value of d (as described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
d
A user-specified value containing the observed weights. d may either be an array or a scalar, depending on the value of dflg.
m
The number of output values.
xl
A lower limit for an interval of interpolation. The interval [xl,xr] is divided into m equal values to produce the interpolated curve.
xr
An upper limit for an interval of interpolation. The interval [xl,xr] is divided into m equal values to produce the interpolated curve.
xo
The interpolated X values.
yo
The interpolated Y values.

c_ftcurvpsdp - smoothing spline for periodic functions

(Double precision version of c_ftcurvps)


This function computes an interpolatory smoothing spline under tension through a sequence of functional values for a periodic function.

Two parameters and one function argument used to control the degree of smoothness -- the parameters are smt, and eps and the function argument is d.

The argument d is a value indicating the degree of confidence in the accuracy of the input function values -- it should be an approximation of the standard deviation of error. Effectively the value of d controls how close the smoothed curve comes to the input data points. If d is small, then the interpolated curve will pass close to the input data. The larger the value of d, the more freedom the smooth curve has in how close it must come to the input data values.

The parameter smt is a more subtle global smoothing parameter; smt must be positive. For small values of smt, the curve approximates the tension spline and for larger values of smt, the curve is smoother. A reasonable value for smt is (float) n.

The parameter eps controls the precision to which smt is interpreted; eps must be between 0. and 1. inclusive. A reasonable value for eps sqrt( 2./(float) n ).

c_ftcurvpsdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftcurvpsdp are: sig, smt, eps, sf2.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

   int c_ftcurvpsdp (int, double [], double [], double, int, double [], int, 
                     double [], double []);
Return value:

c_ftcurvpsdp returns an error value as per:

= 1 if N is less than 2.
= 2 if smt is negative.
= 3 if eps is negative or greater than 1.
= 4 if X values are not strictly increasing.
= 5 if d is negative.

Argument description:

--------------------------------------------------------------
                Argument | Type      |  Size
--------------------------------------------------------------
int c_ftcurvpsdp (n,     | int       |
                  xi,    | double [] | n
                  yi,    | double [] | n
                  p,     | double    |
                  dflg,  | int       |
                  d,     | double [] | n
                  m,     | m         |  
                  xo,    | double [] | m
                  yo     | double [] | m
                 );
--------------------------------------------------------------
n
The number of input data values. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values of the input function (yi[k] is the functional value at x[k] for k=0,n-1).
p
The period of the function.
dflg
A switch for interpreting the value of the argument d (described below). If dflg=0, then d is an array of length n (an error estimate for each input data value); if dflg=1, then d is a scalar that serves as an error estimate for every single data item.
d
A user-specified value containing the observed weights. d may either be an array or a scalar, depending on the value of dflg.
m
The number of output values.
xo
Contains the abscissae for the output values.
yo
Contains the functional values for the smoothing spline ((yo[k] is the functional value at xo[k] for k=0,m-1).

c_ftkurvdp - interpolation for parametric curves

(Double precision version of c_ftkurv)


This function calculates an interpolatory spline under tension through a sequence of points in the plane.

Given a sequence of input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[n-1],y[n-1]).

c_ftkurvdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftkurvdp are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The value for parameter sl1 is in radians and contains the slope at (x[0],y[0]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sl1 may be omitted as indicated by the switch sf1.

The value for parameter sln is in radians and contains the slope at (x[n-1],y[n-1]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sln may be omitted as indicated by the switch sf1.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sl1 is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftkurvdp (int, double [], double [], int, double [], double [],
                  double []);
Return value:

c_ftkurvdp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
              Argument | Type      |  Size
-------------------------------------------------
int c_ftkurvdp (n,     | int       |
                xi,    | double [] | n
                yi,    | double [] | n
                m,     | int       | 
                t,     | double [] | m
                xo,    | double [] | m
                yo     | double [] | m
               );
-------------------------------------------------
n
The number of input data values. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n-1).
m
The number of desired interpolated values.
t
Contains an array of values for the parameter mapping onto the interpolated curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,m-1.
yo
An array containing the Y values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,m-1.

c_ftkurvpdp - interpolation for closed parametric curves

(Double precision version of c_ftkurvp)


This procedure calculates an interpolatory spline under tension through a sequence of points in the plane forming a closed curve.

Given a sequence of distinct input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[0],y[0]) as well (completing the closed curve).

c_ftkurvpdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. The only control parameter that applies to c_ftkurvpdp is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftkurvpdp (int, double [], double [], int, double [], double [],
                   double []);
Return value:

c_ftkurvpdp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
              Argument | Type      |  Size
-------------------------------------------------
int c_ftkurvdp (n,     | int       |
                xi,    | double [] | n
                yi,    | double [] | n
                m,     | int       | 
                t,     | double [] | m
                xo,    | double [] | m
                yo     | double [] | m
               );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n).
m
The number of desired interpolated points.
t
Contains an array of values for the parameter mapping onto the interpolated curve. Any interval [tt,tt+1.] maps onto the entire curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,n-1.
yo
An array containing the Y values for the interpolated points.

c_ftkurvddp - calculate interpolated values and derivatives for parametric curves

(Double precision version of c_ftkurvd)


This procedure behaves like c_ftkurvdp except that in addition it returns the first and second derivatives of the component functions in the parameterization.

Given a sequence of input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[n-1],y[n-1]).

c_ftkurvddp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. Control parameters that apply to c_ftkurvddp are: sig, sl1, sln, sf1.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

The value for parameter sl1 is in radians and contains the slope at (x[0],y[0]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sl1 may be omitted as indicated by the switch sf1.

The value for parameter sln is in radians and contains the slope at (x[n-1],y[n-1]). The angle is measured counter-clockwise from the X axis and the positive sense of the curve is assumed to be that moving from point 0 to point n-1. A value for sln may be omitted as indicated by the switch sf1.

The value of sf1 controls whether to use the values for sl1 and sln, or compute those values internally. Specifically, sf1

= 0 if sl1 and sln are user-specified.
= 1 if sl1 is user-specified, but sln is internally calculated.
= 2 if sln is user-specified, but sln is internally calculated.
= 3 if sl1 and sln are internally calculated.
By default the slopes at the end points are computed internally.

Function prototype:

  int c_ftkurvddp (int, double [], double [], int, double [], double [], 
                   double [], double [], double [], double [], double []);
Return value:

c_ftkurvddp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
               Argument | Type      |  Size
-------------------------------------------------
int c_ftkurvddp (n,     | int       |
                 xi,    | double [] | n
                 yi,    | double [] | n
                 m,     | int       | 
                 t,     | double [] | m
                 xo,    | double [] | m
                 yo,    | double [] | m
                 xd,    | double [] | m
                 yd,    | double [] | m
                 xdd,   | double [] | m
                 ydd    | double [] | m
                );
-------------------------------------------------
n
The number of input data points. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n).
m
The number of desired interpolated points.
t
Contains an array of values for the parameter mapping onto the interpolated curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,n-1.
yo
An array containing the Y values for the interpolated points.
xd
Contains the first derivatives of the X component with respect to t.
yd
Contains the first derivatives of the Y component with respect to t.
xdd
Contains the second derivatives of the X component with respect to t.
ydd
Contains the second derivatives of the Y component with respect to t.

c_ftkurvpddp - interpolation and derivative calculation for closed parametric curves

(Double precision version of c_ftkurvpd)


This procedure behaves like c_ftkurvpdp except that in addition it returns the first and second derivatives of the component functions in the parameterization.

Given a sequence of distinct input points ( (x[0],y[0]), ... , (x[n-1],y[n-1]), the interpolated curve is parameterized by mapping points in the interval [0.,1.] onto the interpolated curve. The resulting curve has a parametric representation both of whose components are splines under tension and functions of the polygonal arc length. The value 0. is mapped onto (x[0],y[0]) and the value 1. is mapped onto (x[0],y[0]) as well (completing the closed curve).

c_ftkurvpddp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc. The only control parameter that applies to c_ftkurvpddp is: sig.

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

Function prototype:

  int c_ftkurvpddp (int, double [], double [], int, double [], double [], 
                    double [], double [], double [], double [], double []);
Return value:

c_ftkurvpddp returns an error value as per:

= 0 -- no error.
= 1 -- if n is less than 2.
= 2 -- if adjacent coordinate pairs coincide.

Argument description:

-------------------------------------------------
                Argument | Type      |  Size
-------------------------------------------------
int c_ftkurvpddp (n,     | int       |
                  xi,    | double [] | n
                  yi,    | double [] | n
                  m,     | int       | 
                  t,     | double [] | m
                  xo,    | double [] | m
                  yo     | double [] | m
                  xd,    | double [] | m
                  yd     | double [] | m
                  xdd,   | double [] | m
                  ydd    | double [] | m
               );
-------------------------------------------------
n
The number of input data values. (n > 1)
xi
An array containing the abscissae for the input function.
yi
An array containing the functional values (y[k] is the functional value at x[k] for k=0,n-1).
m
The number of desired interpolated points.
t
Contains an array of values for the parameter mapping onto the interpolated curve. Any interval [tt,tt+1.] maps onto the entire curve.
xo
An array containing the X values for the interpolated points. t[k] maps to (xo[k],yo[k]) for k=0,n-1.
yo
An array containing the Y values for the interpolated points.
xd
Contains the first derivatives of the X component with respect to t.
yd
Contains the first derivatives of the Y component with respect to t.
xdd
Contains the second derivatives of the X component with respect to t.
ydd
Contains the second derivatives of the Y component with respect to t.

c_ftsurfdp - 2D tension spline interpolation of rectangular data

(Double precision version of c_ftsurf)


This procedure calculates an interpolatory surface passing through a rectangular grid of function values. The surface computed is a tensor product of splines under tension.

c_ftsurfdp is called after all of the desired values for control parameters have been set using the procedures c_ftseti, c_ftsetr, c_ftsetc, c_ftsetfa. The control parameters that apply to c_ftsurfdp are: sig, zx1, zxm, zy1, zyn, z11, zm1, z1n, zmn, df1, df2, df3, df4, df5, df6, df7, df8

The value for the parameter sig specifies the tension factor. Values near zero result in a cubic spline; large values (e.g. 30) result in nearly a polygonal line. A typical value is 1. (the default). Values of sig larger than about 40. can result in an internal floating point overflow on 32-bit machines, so you should keep SIGMA below that number on such machines.

zx1 is an array containing ni X-partial derivatives of the function along the line xi[0], that is zx1[j] is the X-partial derivative at point (x[0],y[j]) for j=0,ni-1. This parameter may be defaulted by setting the value for df1 appropriately. The default is to compute zx1 internally. Values for zx1 can be set using the procedure c_ftsetfa.

zxm is an array containing ni X-partial derivatives of the function along the line xi[mi-1], that is zxm[j] is the X-partial derivative at point (xi[mi-1],yi[j]) for j=0,ni-1. This parameter may be defaulted by setting the value for df2 appropriately. The default is to compute zx2 internally. Values for zxm can be set using the procedure c_ftsetfa.

zy1 is an array containing mi Y-partial derivatives of the function along the line yi[0], that is zy1[j] is the Y-partial derivative at point (x[i],y[0]) for i=0,mi-1. This parameter may be defaulted by setting the value for df3 appropriately. The default is to compute zy1 internally. Values for zy1 can be set using the procedure c_ftsetfa.

zyn is an array containing mi Y-partial derivatives of the function along the line yi[ni-1], that is zyn[j] is the Y-partial derivative at point (x[i],y[ni-1]) for i=0,mi-1. This parameter may be defaulted by setting the value for df4 appropriately. The default is to compute zyn internally. Values for zyn can be set using the procedure c_ftsetfa.

z11, zm1, z1n, zmn specify X-Y-partial derivatives of the function at the four corners (xi[0],yi[0]), (xi[mi-1],yi[0]), (xi[0],yi[ni-1]), (xi[mi-1],yi[ni-1]), These parameters may be defaulted by setting the values for df5, df6, df7, df8, appropriately. The default is to compute z11, zm1, z1n, zmn internally.

Function prototype:

  double *c_ftsurfdp (int, int, double *, double *, double *, 
                      int, int, double *, double *, int *);
Return value:

c_ftsurfdp returns a pointer to an array containing mo x no doubles which are the interpolated values on the grid specified by the arrays xo and yo.

Argument description:

---------------------------------------------------------------
                 Argument | Type      |  Size
---------------------------------------------------------------
double *c_ftsurfdp (mi,   | int       |
                   ni,    | int       |
                   xi,    | double *  | pointer to m doubles
                   yi,    | double *  | pointer to n doubles
                   zi,    | double *  | pointer to m * n doubles
                   mo,    | int       |
                   no,    | int       |
                   xo,    | double *  | pointer to mo doubles
                   yo,    | double *  | pointer to no doubles
                   ier    | int *     |
                  );
---------------------------------------------------------------
mi
The number of grid lines in the X direction. (mi > 1)
ni
The number of grid lines in the Y direction. (ni > 1)
xi
Pointer to an array containing mi X coordinates for grid lines in the X direction.
yi
Pointer to an array containing ni Y coordinates for grid lines in the Y direction.
zi
Pointer to mi x ni doubles which are the functional values at the grid points defined by xi and yi.
mo
The number of output values in the X direction.
no
The number of output values in the Y direction.
xo
Pointer to an array containing mo X coordinates for grid lines in the X direction in the output interpolation grid.
xo
Pointer to an array containing no Y coordinates for grid lines in the Y direction in the output interpolation grid.
ier
The value *ier is an error flag as per:
= 0 -- no error.
= 1 -- if n is less than 2 or m is less than 2.
= 2 -- if X or Y values are not strictly increasing.

home | contents | defs | params | procedures | exmpls