NaturalNeighborInterpolation - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Interpolation

  

NaturalNeighborInterpolation

  

interpolate 2-D scattered data using the natural neighbor interpolation method

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

NaturalNeighborInterpolation(xy,z)

f:=NaturalNeighborInterpolation(xy,z)

f(x,y)

f(M)

Parameters

xy

-

listlist, Array, or Matrix of the form ; the (x,y) coordinates of the sample points

z

-

list, Array, or Vector of sample values corresponding to the (x,y) points

x,y

-

evaluate f at (x,y)

M

-

a k x 2 Matrix of points at which to evaluate f

Description

• 

The NaturalNeighborInterpolation command creates a function  which can then be evaluated at arbitrary points within the convex hull of the sample points.

• 

The natural neighbor triangular interpolant is defined as follows. First, the Voronoi diagram on the given input points xy is determined. Now, to find , find what would change if the point  would be added to the Voronoi diagram: some of the polygons would shrink to make space for a polygon around . If the polygon around point  would shrink by area , then the value of the interpolant  is defined as the weighted average of the values , weighted by weights .

• 

A natural neighbor interpolant is  continuous except at the sample points.

• 

This interpolation method does not introduce local minima or maxima or infer trends which are not already present in the input data.

• 

Results may be poor when interpolating near the convex hull of the sample points.

• 

Evaluating f at points outside of the convex hull produces .

• 

As with all interpolation methods, the interpolant f always passes through all of the sample values.

• 

Input sample points must not contain duplicates. The presence of duplicate points can lead to unexpected results.

• 

In order to evaluate f at k points, you can put each point in a row of a Matrix M and call f(M) to obtain the k values of f in a k-element Vector. This will be most efficient if M's options are such that its datatype is float[8], its order is C_order, and its storage is rectangular.

Examples

(1)

(2)

(3)

f can be polled at specific points.

(4)

(5)

(6)

Use plot3d to plot the interpolated surface.

Compatibility

• 

The Interpolation[NaturalNeighborInterpolation] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

Interpolation

 


Download Help Document