Interpolation, Method -> "Shepard"

Interpolation[funcvaluelist,Method→"Shepard",(options)] represents a way to perform interpolation according to Shepard's method, when funcvaluelist is a list of scattered control points together with the function values in these points.
  • To use Interpolation, Method→"Shepard", you first need to load the Obtuse Package using Needs["Obtuse`"].
  • The following options can be given:
DistanceFunctionAutomaticdistance function to use in calculation of the distance matrix and the calculation of the distance from the interpolation point to the control points. Note, that the function here is expected to return the square of the distance
ShepardPower6The weight of each control point is proportional to the distance, taken to the inverse ShepardPower power.
Click for copyable input
Some 2D points:
Click for copyable input
Add function values to the 2D point table:
Click for copyable input
Test interpolation in one point:
Click for copyable input
Check with the original function in the same point:
Click for copyable input
If the same interpolation should be used in many different points, the function can be precompiled without specifying in which point it will be used. Note, in the plot below, that extrapolation is used along the border of the plot. In the plot below, you might test with different values for the ShepardPower option.
Click for copyable input