Skip to content

tsearchn

geometry · scripts/geometry/tsearchn.m

: t = tsearchn (x, tri, xi)
: [t, p] = tsearchn (x, tri, xi)

Locate the simplices of a triangulation that enclose query points.

x is m-by-n, tri is k-by-(n+1) with 1-based row indices into x and xi is p-by-n. t is a column holding, for each query point, the number of the first enclosing simplex, or NaN if there is none. The optional p holds the barycentric coordinates of the query points in those simplices (NaN rows where t is NaN). Zero-volume simplices are never selected.