Suppose we have five vertices:
X = [0 1;
2 1;
4 1;
1 0;
3 0];
a triangulation:
T = [1 4 2;
4 5 2;
5 3 2];
and function values defined on the vertices:
Fx = [1;
2;
3;
4;
-5];
then we can easily compute the function value for any point inside the triangle by using the barycentric coordinates. For point P = [1 .5]
, which lies in the first triangle, the barycentric coordinates are B = [.25 .5 .25]
, so the function evaluates to Fxi = 1/4 + 4/2 + 2/4 = 2.75
.
However, I have difficulty to see how one would extrapolate this surface. We could find the closest triangle and extrapolate from that. The problem is that this results in a discontinuous function. Consider e.g. point P = [2 2]
. According to triangle 1, its value would be -0.5, whereas according to triangle 3 its value would be 9.5.
Is there a "standard" or generally accepted approach to extrapolate from piecewise linear functions? Any pointers to existing material also greatly appreciated.
A possibility is Shepard's method:
https://en.wikipedia.org/wiki/Inverse_distance_weighting
The resulting function interpolates the input values defined at the vertices and is non-linear but continuous everywhere else.
The choice p=2 usually gives decent results.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With