shepard_interp_2d
shepard_interp_2d,
a Python code which
defines and evaluates Shepard interpolants to scattered 2D data,
based on inverse distance weighting.
The test also needs the test_interp_2d() library.
Licensing:
The information on this web page is distributed under the MIT license.
Languages:
shepard_interp_2d is available in
a C version and
a C++ version and
a Fortran77 version and
a Fortran90 version and
a MATLAB version and
an Octave version and
a Python version.
Related Data and Programs:
padua,
a Python code which
returns the points and weights for Padua sets, useful for interpolation
in 2d.
pwl_interp_2d,
a Python code which
evaluates a piecewise linear interpolant to data defined on
a regular 2d grid.
rbf_interp_2d,
a Python code which
defines and evaluates radial basis function (RBF) interpolants to 2d data.
shepard_interp_1d,
a Python code which
defines and evaluates Shepard interpolants to 1d data,
based on inverse distance weighting.
test_interp_2d,
a Python code which
defines test problems for interpolation of data z(x,y)),
depending on a 2d argument.
Reference:
-
Richard Franke,
Scattered Data Interpolation: Tests of Some Methods,
Mathematics of Computation,
Volume 38, Number 157, January 1982, pages 181-200.
-
Donald Shepard,
A two-dimensional interpolation function for irregularly spaced
data,
ACM '68: Proceedings of the 1968 23rd ACM National Conference,
ACM, pages 517-524, 1969.
Source Code:
The code generates some plots of the data and approximants.
-
p01_data.png,
the data for problem p01 with a linear interpolant.
-
p01_power1.png,
the Shepard interpolant for problem p01 with P = 1.0.
-
p01_power2.png,
the Shepard interpolant for problem p01 with P = 2.0.
-
p01_power4.png,
the Shepard interpolant for problem p01 with P = 4.0.
-
p01_power8.png,
the Shepard interpolant for problem p01 with P = 8.0.
-
p02_data.png,
the data for problem p02 with a linear interpolant.
-
p02_power1.png,
the Shepard interpolant for problem p02 with P = 1.0.
-
p02_power2.png,
the Shepard interpolant for problem p02 with P = 2.0.
-
p02_power4.png,
the Shepard interpolant for problem p02 with P = 4.0.
-
p02_power8.png,
the Shepard interpolant for problem p02 with P = 8.0.
-
p03_data.png,
the data for problem p03 with a linear interpolant.
-
p03_power1.png,
the Shepard interpolant for problem p03 with P = 1.0.
-
p03_power2.png,
the Shepard interpolant for problem p03 with P = 2.0.
-
p03_power4.png,
the Shepard interpolant for problem p03 with P = 4.0.
-
p03_power8.png,
the Shepard interpolant for problem p03 with P = 8.0.
-
p04_data.png,
the data for problem p04 with a linear interpolant.
-
p04_power1.png,
the Shepard interpolant for problem p04 with P = 1.0.
-
p04_power2.png,
the Shepard interpolant for problem p04 with P = 2.0.
-
p04_power4.png,
the Shepard interpolant for problem p04 with P = 4.0.
-
p04_power8.png,
the Shepard interpolant for problem p04 with P = 8.0.
-
p05_data.png,
the data for problem p05 with a linear interpolant.
-
p05_power1.png,
the Shepard interpolant for problem p05 with P = 1.0.
-
p05_power2.png,
the Shepard interpolant for problem p05 with P = 2.0.
-
p05_power4.png,
the Shepard interpolant for problem p05 with P = 4.0.
-
p05_power8.png,
the Shepard interpolant for problem p05 with P = 8.0.
-
p06_data.png,
the data for problem p06 with a linear interpolant.
-
p06_power1.png,
the Shepard interpolant for problem p06 with P = 1.0.
-
p06_power2.png,
the Shepard interpolant for problem p06 with P = 2.0.
-
p06_power4.png,
the Shepard interpolant for problem p06 with P = 4.0.
-
p06_power8.png,
the Shepard interpolant for problem p06 with P = 8.0.
-
p07_data.png,
the data for problem p07 with a linear interpolant.
-
p07_power1.png,
the Shepard interpolant for problem p07 with P = 1.0.
-
p07_power2.png,
the Shepard interpolant for problem p07 with P = 2.0.
-
p07_power4.png,
the Shepard interpolant for problem p07 with P = 4.0.
-
p07_power8.png,
the Shepard interpolant for problem p07 with P = 8.0.
-
p08_data.png,
the data for problem p08 with a linear interpolant.
-
p08_power1.png,
the Shepard interpolant for problem p08 with P = 1.0.
-
p08_power2.png,
the Shepard interpolant for problem p08 with P = 2.0.
-
p08_power4.png,
the Shepard interpolant for problem p08 with P = 4.0.
-
p08_power8.png,
the Shepard interpolant for problem p08 with P = 8.0.
-
p09_data.png,
the data for problem p09 with a linear interpolant.
-
p09_power1.png,
the Shepard interpolant for problem p09 with P = 1.0.
-
p09_power2.png,
the Shepard interpolant for problem p09 with P = 2.0.
-
p09_power4.png,
the Shepard interpolant for problem p09 with P = 4.0.
-
p09_power8.png,
the Shepard interpolant for problem p09 with P = 8.0.
-
p10_data.png,
the data for problem p10 with a linear interpolant.
-
p10_power1.png,
the Shepard interpolant for problem p10 with P = 1.0.
-
p10_power2.png,
the Shepard interpolant for problem p10 with P = 2.0.
-
p10_power4.png,
the Shepard interpolant for problem p10 with P = 4.0.
-
p10_power8.png,
the Shepard interpolant for problem p10 with P = 8.0.
-
p11_data.png,
the data for problem p11 with a linear interpolant.
-
p11_power1.png,
the Shepard interpolant for problem p11 with P = 1.0.
-
p11_power2.png,
the Shepard interpolant for problem p11 with P = 2.0.
-
p11_power4.png,
the Shepard interpolant for problem p11 with P = 4.0.
-
p11_power8.png,
the Shepard interpolant for problem p11 with P = 8.0.
-
p12_data.png,
the data for problem p12 with a linear interpolant.
-
p12_power1.png,
the Shepard interpolant for problem p12 with P = 1.0.
-
p12_power2.png,
the Shepard interpolant for problem p12 with P = 2.0.
-
p12_power4.png,
the Shepard interpolant for problem p12 with P = 4.0.
-
p12_power8.png,
the Shepard interpolant for problem p12 with P = 8.0.
-
p13_data.png,
the data for problem p13 with a linear interpolant.
-
p13_power1.png,
the Shepard interpolant for problem p13 with P = 1.0.
-
p13_power2.png,
the Shepard interpolant for problem p13 with P = 2.0.
-
p13_power4.png,
the Shepard interpolant for problem p13 with P = 4.0.
-
p13_power8.png,
the Shepard interpolant for problem p13 with P = 8.0.
Last modified on 23 March 2026.