geometry (version 0.4.2)

tsearchn: Search for the enclosing Delaunay convex hull

Description

For t = delaunayn(x), where x is a set of points in \(N\) dimensions, tsearchn(x, t, xi) finds the index in t containing the points xi. For points outside the convex hull, idx is NA. tsearchn also returns the barycentric coordinates p of the enclosing triangles.

Usage

tsearchn(x, t, xi, ...)

Arguments

x

An \(N\)-column matrix, in which each row represents a point in \(N\)-dimensional space.

t

A matrix with \(N+1\) columns. A row of t contains indices into x of the vertices of an \(N\)-dimensional simplex. t is usually the output of delaunayn.

xi

An \(M\)-by-\(N\) matrix. The rows of xi represent \(M\) points in \(N\)-dimensional space whose positions in the mesh are being sought.

...

Additional arguments

Value

A list containing:

idx

An \(M\)-long vector containing the indices of the row of t in which each point in xi is found.

p

An \(M\)-by-\(N+1\) matrix containing the barycentric coordinates with respect to the enclosing simplex of each point in xi.

Details

If x is NA and the t is a delaunayn object produced by delaunayn with the full option, then use the Qhull library to perform the search. Please note that this is experimental in geometry version 0.4.0 and is only partly tested for 3D hulls, and does not yet work for hulls of 4 dimensions and above.

See Also

tsearch, delaunayn