1

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?

Adrian
  • 424
  • If you use a quadratic function $a+bx+cy+dx^2+exy+fy^2$ you have 6 parameters. Enforcing the interpolation at the 4 points leaves you with 2 degree of freedom. Do what you consider the best with them. For instance, minimize the $L^2$ norm of the gradient. – Federico Dec 07 '18 at 20:13
  • I have 8 derivatives as well, so 2 can be used for these missing degrees of freedom, but that means I am not using the other 6. – Adrian Dec 07 '18 at 20:15
  • Yes, so you cannot enforce all the conditions. Therefore you can just try to minimize the discrepancy with the derivatives – Federico Dec 07 '18 at 20:16
  • So there is no better method which matches all the 8 derivatives as well? – Adrian Dec 07 '18 at 20:17
  • Otherwise increase the order of the interpolating polynomial. That way you may be able to enforce all the conditions, and the you use a suitable minimization problem to select the best solution of the under-determined problem – Federico Dec 07 '18 at 20:17

3 Answers3

1

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

Federico
  • 5,900
0

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

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

Adrian
  • 424