home

=Mohammad Hammoudeh=

Email: **m.hammoudeh@mmu.ac.uk**

Web: [|www.hammoudeh.net]


 * You need code!!! Email me...**

__Shepard Interpolation__
Original paper can be downloaded from: [|A two-dimensional interpolation for irregularly-spaced data function] My study of the algorithm including better notation :) can be downloaded from here:

Below is the implementation of the algorim with the stepwise improvements suggested by Shepard to overcome the shortcomings of pure inverse-distance weighting (see section 5 in the paper). In all implementations we use 78 data points as a testing data. These are heihgt data taking from the Grand Canyon height map (see figure below). Each improvement requires to build on the improvements before it which results in a full implementation of the algorithm after implementing the last suggested improvement. Each file includes the source code and the interpolation results.

1- Basic Algorithm:
A function of the distances to known data points.

2- Selecting Nearby Points:
Only includes nearby data points that are significant in computing any interpolated value.

3- Including Direction:
A direction factor is used in addition to a distance factor in defining weightings.

4- Determining Slope:
Increments were add to the function values at nearby data points so that the interpolated surface would achieve desired partial derivatives at data points Di.

5- Simulating the effect of barriers:
Using the function described in Shepard paper without any changes. The barrier is defined to be a straight line from (0,0) to (256,256)

Problems with interpolation
1- Calculating Si //Fixed; problem was in calculating the effective distance// When the distance from a point, P, to Data point, Di, equal {r'} then Si == 0. This is a result of the term:si = (27/(4*r'))*(((d/r')-1)**2).**
 * For example:**
 * d = 109.767937031**
 * R = 109.767937031**
 * C = [(109.7679370308106, (3, 17, 109), 0.0), (109.7679370308106, (7, 147, 115), 0.0), (109.7679370308106, (21, 167, 119), 0.0), (109.7679370308106, (25, 56, 111), 0.0)]**
 * which results in sum{si} = 0 which cause float division error when calculating wi.**
 * BUT: It can't be that the next point out of the radius on the radius???**
 * Look at how to calculate the distance...**


 * 2- The only problem I found when I was simulating with large data sets is that when ALL data points included in the calculation of point P has the same reading/value then max{zi} equal min{zi} which results in zero Ai and Bi values for all points. Therefor, max{Ai^2 + Bi^2} will equal zero which results in float division error when calculating "v". Maybe in our Friday meeting we discuss possible solutions/ideas.**

__Shepard References and Papers__
1-Scattered Data Interpolation: Tests of Some Method** Richard Franke //Mathematics of Computation// concerned with the evaluation of methods for scattered data interpolation and some of the results of the tests when applied to a number of methods. The process involves evaluation of the methods in terms of timing, storage, accuracy, visual pleasantness of the surface, and ease of implementation. To indicate the flavor of the type of results obtained, we give a summary table and representative perspective plots of several surfaces.

2- PRESENTATION AND ANALYSIS OF A MULTI-DIMENSIONAL INTERPOLATION FUNCTION FOR NON-UNIFORM DATA: MICROSPHERE PROJECTION http://www.dudziak.com/microsphere.pdf Introduction When dealing with randomly located or clustered data, interpolation error will vary as a function of the distance to the nearest sample or cluster of samples.

grid of known color values. This grid can be resized or distorted in a number of ways using a host of algorithms, most common of which are Nearest-Neighbor, Bilinear, and Bicubic interpolations [7]. Although these algorithms perform remarkably well with a perfectly-ordered grid of sample points, their usefulness can be quickly outlived when the provided data is non-uniformly distributed across the sample space.

=Multivariate Interpolation= Shepard's method for fitting a surface to data values at scattered points in the plane has the advantages of a small storage requirement and an easy generalization to more than two independent variables, but suffers from low accuracy and a high computational cost relative to some alternative methods.
 * 1) ACM paper: Multivariate interpolation of large sets of scattered data [[file:p139-renka.pdf]]
 * 1) [|Interpolation of scattered data by means of operators of Shepard type]: An efficient method for multivariate interpolation of very large scattered data sets is the method of Shepard. It has the advantages of a small storage requirement and an easy generalization to additional independent variables, but it suffers from no good reproduction quality, low accuracy and a high computational cost relative to some alternative methods.
 * 2) [|Multivariate Interpolation]: We can generalize the Vandermonde method to interpolate multivariate real-valued functions. We will focus on bivariate polynomials, and the generalization is obvious. For example, we may have a surface defined by a function of //x// and //y//, e.g., f(//x//, //y//). Given points ((//x//1, //y//1), //z//1), ((//x//2, //y//2), //z//2), ..., ((//x////n//, //y////n//), //z////n//) find an interpolating polynomial. By simply substituting the points into the bivariate polynomial, you naturally get a system of linear equations in the coefficients which may then be solved using Gaussian elimination or LU decomposition.
 * 3) ACM paper: [|A practical approach to multivariate interpolation] [[file:GetPDFServlet.pdf]]
 * 4) [|Good notation] and [|another good notation] and [|another] and [|discrete sets]
 * 5) [|Interpolation definition(S); dimenssions]
 * 6) [|Spatial interpolation] it is a nice definition and full description of interpolation. Also explains many things in the "Spatial interpolation" section
 * 7) [|Scattered Data Interpolation: Tests of Some Method]