naginterfaces.library.interp.dim2_​triang_​bary_​eval

naginterfaces.library.interp.dim2_triang_bary_eval(x, y, f, triang, px, py)[source]

dim2_triang_bary_eval performs barycentric interpolation, at a given set of points, using a set of function values on a scattered grid and a triangulation of that grid computed by dim2_triangulate().

For full information please refer to the NAG Library document for e01eb

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/e01/e01ebf.html

Parameters
xfloat, array-like, shape

The coordinates of the th data point, , for . and must be unchanged from the previous call of dim2_triangulate().

yfloat, array-like, shape

The coordinates of the th data point, , for . and must be unchanged from the previous call of dim2_triangulate().

ffloat, array-like, shape

The function values at , for .

triangint, array-like, shape

The triangulation computed by the previous call of dim2_triangulate(). See Further Comments for details of how the triangulation used is encoded in .

pxfloat, array-like, shape

The coordinates , for , at which interpolated function values are sought.

pyfloat, array-like, shape

The coordinates , for , at which interpolated function values are sought.

Returns
pffloat, ndarray, shape

The interpolated values , for .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, the triangulation information held in the array does not specify a valid triangulation of the data points. has been corrupted since the call to dim2_triangulate().

Warns
NagAlgorithmicWarning
(errno )

At least one evaluation point lies outside the nodal triangulation. For each such point the value returned in is that corresponding to a node on the closest boundary line segment.

Notes

dim2_triang_bary_eval takes as input a set of scattered data points , for , and a Thiessen triangulation of the computed by dim2_triangulate(), and interpolates at a set of points , for .

If the th interpolation point is equal to for some value of , the returned value will be equal to ; otherwise a barycentric transformation will be used to calculate the interpolant.

For each point , a triangle is sought which contains the point; the vertices of the triangle and values at the vertices are then used to compute the value .

If any interpolation point lies outside the triangulation defined by the input arguments, the returned value is the value provided, , at the closest node .

dim2_triang_bary_eval must only be called after a call to dim2_triangulate().

References

Cline, A K and Renka, R L, 1984, A storage-efficient method for construction of a Thiessen triangulation, Rocky Mountain J. Math. (14), 119–139

Lawson, C L, 1977, Software for surface interpolation, Mathematical Software III, (ed J R Rice), 161–194, Academic Press

Renka, R L, 1984, Algorithm 624: triangulation and interpolation of arbitrarily distributed points in the plane, ACM Trans. Math. Software (10), 440–442

Renka, R L and Cline, A K, 1984, A triangle-based interpolation method, Rocky Mountain J. Math. (14), 223–237