WebCab Functions Web Services for .NET v2.0

Interpolation.BicubicCoefficients Method 

Calculates the coefficients of the bicubic interpolation polynomial for the rectangular grid cell under consideration.

public double[][] BicubicCoefficients(
   double[] dataPoints,
   double[] derivatives1stDirection,
   double[] derivatives2ndDirection,
   double[] crossDerivatives,
   double lengthGrid1stDirection,
   double lengthGrid2ndDirection
);

Parameters

dataPoints
An array of four double values which represent the value of the interpolation bicubic spline at the four grid cell corner points.
derivatives1stDirection
An array of the derivatives at the four grid cell corner points in the 1st direction of the grid of the interpolation bicubic spline.
derivatives2ndDirection
An array of the derivative at the four grid cell corner points in the 2nd direction of the grid of the interpolation bicubic spline.
crossDerivatives
An array of length 4 containing the cross derivatives evaluated at the four grid cell points of the interpolation bicubic spline.
lengthGrid1stDirection
The length of the grid cell in the 1st direction.
lengthGrid2ndDirection
The length of the grid cell in the 2nd direction.

Remarks

Overview of Parameters

Given arrays dataPoints, derivatives1stDirection, derivatives2ndDirection and crossDerivatives, each of length 4 contain the function, gradients parallel to the grid axis, and the cross derivatives evaluated at the four grid points of a rectangular grid cell. The first element of the array corresponds the values at the lower left (when viewed from above) grid point, with the remaining second, third and fourth elements of the array's consecutively assigned to the other points in counter clockwise direction.

Structure of Returned array giving the coefficients

Given lengthGrid1stDirection and lengthGrid2ndDirection, the lengths of the grid cell in the 1st and 2nd directions, this method returns a array of dimension 2 of length 4, where each of the four arrays also have length 4 (i.e. a 4 by 4 matrix). The 2 dimensional array coeff[i][j] contains the coefficients in the bicubic polynomial of the grid cell under consideration in accordance with the following convention:

f(x,y) = (coeff[3][0] * y3) + (coeff[3][1] * y3 * x) + ... + (coeff[3][3] * y3 * x3) +
.... + coeff[0][0] + (coeff[0][1] * x) + ... + (coeff[0][3] * x3)

where the variable x is the coordinate value in the 1st direction, and the variable y is the coordinate values in the 2nd direction where the origin is at the grid point at the lower left corner of the grid cell considered. Recall that this grid point is also the point at which the first elements of each of the arrays dataPoints, derivatives1stDirection, derivatives2ndDirection and crossDerivatives; correspond to.

See Also

Interpolation Class | Interpolation Namespace | BicubicInterpolation(double[],...) evaluates the values and derivatives of a bicubic polynomial taken the bicubic polynomials coefficients are a parameter.