2d interpolation using derivatives

667 Views Asked by At

I have four points on a rectangular grid $(x_1,y_1)$, $(x_1,y_2)$, $(x_2,y_1)$ and $(x_2,y_2)$. I also have the value of a third variable $z$ at each of these points, as well as the partial derivatives $\frac{\partial z}{\partial x}$ and $\frac{\partial z}{\partial y}$ at each of these points.

I would like to perform 2-d interpolation to obtain the value of $z$ at any point $(x,y)$ within the grid block.

I can easily perform 2-d linear interpolation using the four values of $z$, however I would like to increase the smoothness by using the eight derivatives I already have.

I have read up about bicubic interpolation but this requires four 2nd derivatives which I do not have.

Is there a method using the 12 bits of data I have which gives a smoother surface than the linear solution?

3

There are 3 best solutions below

0
On

Interpolate along the grid lines using Hermite cubic splines. https://en.wikipedia.org/wiki/Cubic_Hermite_spline

Then inside a tile, use the Coons method. https://en.wikipedia.org/wiki/Coons_patch

0
On

Here is a silly way of doing it.

Lets work in $[0,1]^2$ for simplicity.

Consider the functions $$ f(x,y)=x(1-x)^2(1-y) \qquad \text{and} \qquad g(x,y)=(1-x)^2(1+2x)(1-y)^2(1+2y) . $$ We have 12 values we are interested in: the 4 values of a function at the vertices and the 8 values of the partial derivatives. As it happens, among these 12 values the function $g$ has only the value at $(0,0)$ that is nonzero (it is $1$) and the function $f$ has only one derivative at $(0,0)$ which is nonzero (it is $1$).

Therefore the functions $$ g(x,y) \quad g(1-x,y) \quad g(x,1-y) \quad g(1-x,1-y) $$ and $$ f(x,y) \quad f(1-x,y) \quad f(x,1-y) \quad f(1-x,1-y) $$ $$ f(y,x) \quad f(y,1-x) \quad f(1-y,x) \quad f(1-y,1-x) $$ form a basis for the problem.

Moreover, since I chose the functions well, meaning that the 12 values are all $0$ except 1 which is $1$, finding the coefficients to use is a trivial job.


Graph of $f$. The function vanishes at the vertices and only one partial derivative is nonzero: enter image description here

Graph of $g$. Only one of the values at the vertices is nonzero, and all the partial derivatives vanish: enter image description here

0
On

Actually regular 2-d cubic splines does a good job, without any need for Hermite or Coons, or invention of new functions. All partials here are zero, grid points have function values 2, 3, 4, 5. example