Interpolate a rectangular surface with given edges

231 Views Asked by At

I need to interpolate a surface by filling a rectangular hole. The height values of the edges are given.

I would like to fill the rectangular surface patch by somehow interpolating the edge values. I already tried bilinear interpolation but the result wasnt very good.

Do you know any fast way to interpolate the hole? The best way would be a function $f(x,y) : \mathbb{R^2} \to \mathbb{R}$ that assigns a height value for every point of the surface.

1

There are 1 best solutions below

3
On BEST ANSWER

Let's call $f_0(y)$ the values on the segment $\{0\}\times[0,1]$, $f_1(y)$ the values on $\{1\}\times [0,1]$, and similarly $g_0(x)$ and $g_1(x)$.

A continuous function interpolating them is $$ \frac{[(1-x)f_0(y) + xf_1(y)]y(1-y) + [(1-y)g_0(x) + yg_1(x)]x(1-x)}{x(1-x) + y(1-y)} $$