Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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.

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.

Note

Based on the Octave function Copyright (C) 2007-2012 David Bateman.

Author(s)

David Sterratt

See Also


geometry

Mesh Generation and Surface Tessellation

v0.4.5
GPL (>= 3)
Authors
Jean-Romain Roussel [cph, ctb] (wrote tsearch function with QuadTrees), C. B. Barber [cph], Kai Habel [cph, aut], Raoul Grasman [cph, aut], Robert B. Gramacy [cph, aut], Pavlo Mozharovskyi [cph, aut], David C. Sterratt [cph, aut, cre] (<https://orcid.org/0000-0001-9092-9099>)
Initial release
2019-12-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.