Evaluates the value and derivatives parallel to the axis of the grid cell's axis of the bicubic interpolation evaluated at a given point.
2-dimensional array of length 4 which is populated in accordance with the convention described above which contains the coefficients of the bicubic interpolation polynomials coefficients.
We return an array of length 3, where the first term
is the value at a given point of the bicubic interpolation function;
the second and third terms are the derivatives of the bicubic interpolation
function evaluated at the same given point in the directions parallel
to the grid axis over which the bicubic interpolation function is
constructed (see discussion below for further explanation).
This method requires coefficients of the bicubic interpolation polynomial for the given grid cell are given. The coefficients can be evaluated by applying BicubicCoefficients. From this information we are able to construct the bicubic interpolation polynomial from which its values and derivatives are evaluated. The method BicubicInterpolation(double[], ...) differs at that it essential combines BicubicCoefficients, and this method into one method.
In instances when the bicubic interpolation functions value and derivatives are only required at one point then the method BicubicInterpolation(double[], ...), is equivalent in terms of speed to the application of BicubicCoefficients, followed by this method. However, in cases where the value and derivatives are required at many points then the application of BicubicCoefficients once, followed be repeated calls of this method will be more efficient than the same information evaluated using repeated calls to BicubicInterpolation(double[], ...). The reason for this is that this method will require that the bicubic interpolation polynomial is constructed for each point at which the value and derivatives of the bicubic interpolation polynomial are desired. Where as this approach will only require that the bicubic interpolation polynomial is only constructed once via evaluation of its coefficients (using BicubicCoefficients), however many points values of the interpolations polynomials value and derivatives are read off.
Coefficients parameterThe coefficients of the bicubic interpolation polynomial which is represented by
a 2 dimensional array of length 4, where each of the four
arrays elements also have length 4 (i.e. a 4 by 4
matrix). As mentioned before these coefficients can be evaluated using
BicubicCoefficients, which will return the coefficients
in the following form which is in accordance with how they must be provide fer this
method. That is, bicubic interpolation polynomials (i.e. f(x,y)),
coefficients coeff, must be given 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 of the grid
axis, and the variable y is the coordinate values in the 2nd direction of the grid
axis, where the origin is at the grid point at the lower left corner of the grid cell
considered.
Remark: If BicubicCoefficients is used to evaluate the coefficients of the bicubic interpolation polynomial. Then the 1st and 2nd direction parallel to the grid axis mentioned above should be correlated with the choices made in BicubicCoefficients.
We provide the example below in order to illustrate the use of this method in a sufficiently explicit form as to allow you to be able to directly abstract the nature the methods and the parameters used to your particular situation.
A typical example is when we require to know the value of a function in the coordinate pane at the point (3.7, 4.8); when the function itself is known on a grid which consists of coordinates with for example integer values (i.e. (0,0), (1,0), (0,1), (1,1) and so on...). Firstly, with respect to this method when we refer to the function being known, we refer to the fact that we know the functions values on the grid points, its derivatives on the grid points in the two directions spanning the grid and the cross derivatives in the two direction at the grid points are known values.
Assuming we have such an instance and we consider in two dimensional Euclidean coordinate space a (sufficiently smooth) function. We wish to find the value of the Bicubic interpolation of this given function at the point (3.7, 4.8) and return an estimate of the error. The coordinate space on which the function has been given has been tabulated with respect to a rectangular grid with the vertices of this grid lying on coordinate points with integer values (i.e. (0,0), (1,0), (0,1, (1,1) and so on...). If we are considering the particular interpolation point (3.7, 4.8), then in order to evaluated the interpolation function at a given point using this method we will need to provide the following parameters:
direction1 - the direction in the x-axis and has a value of 3.7
direction2 - the direction in the y-axis and has a value of 4.8
direction1LowerGridPoint - the coordinate of the lower coordinate of
the grid square in the 1st direction is 3
direction1UpperGridPoint - the coordinate of the upper coordinate of
the grid square in the 1st direction is 4
direction2LowerGridPoint - the coordinate of the lower coordinate of
the grid square in the 2nd direction is 4
direction2UpperGridPoint - the coordinate of the lower coordinate of
the grid square in the 2nd direction is 5
Interpolation Class | WebCab.Libraries.Math.Interpolation Namespace | Interpolation.BicubicInterpolation Overload List