tsearchn {geometry} | R Documentation |
Search for the enclosing Delaunay convex hull
Description
For t = delaunayn(x)
, where x
is a set of points in d
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, fast = TRUE)
Arguments
x |
An n -by-d matrix. The rows of x represent
n points in d -dimensional space.
|
t |
A m -by-d+1 matrix. A row of t contains
indices into x of the vertices of a d -dimensional simplex.
t is usually the output of delaunayn.
|
xi |
An ni -by-d matrix. The rows of xi represent
n points in d -dimensional space whose positions in the mesh
are being sought.
|
fast |
If the data is in 2D, use the fast C-based tsearch
function to produce the results.
|
Value
A list containing:
list("idx") |
An ni -long vector
containing the indicies of the row of t in which each point in
xi is found.
|
list("p") |
An ni -by-d+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
tsearch, delaunayn
[Package
geometry version 0.3-6
Index]