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.
tsearchn(x, t, xi, ...)
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
.
An \(N\)-column matrix, in which each row represents a point in \(N\)-dimensional space.
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.
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
David Sterratt
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.
tsearch
, delaunayn