ID = pointLocation(TR,P)
returns the IDs of the triangles or tetrahedra enclosing the query points in
P. Each row in the matrix P contains the
coordinates of a query point.
ID = pointLocation(TR,x,y)
specifies the x-coordinates and y-coordinates
of 2-D query points as separate column vectors.
ID = pointLocation(TR,x,y,z)
specifies the x-coordinates, y-coordinates,
and z-coordinates of 3-D query points as separate column
vectors.
[ID,B] =
pointLocation(___)
also returns the barycentric coordinates of each query point with respect to its
enclosing triangle or tetrahedron for any of the previous syntaxes.
Query points, specified as a 2-column matrix (2-D) or a 3-column matrix
(3-D). P contains the x-coordinates,
y-coordinates, and (possibly)
z-coordinates of the query points.
Data Types: double
x — x-coordinates column vector
x-coordinates of query points, specified as a column
vector.
Data Types: double
y — y-coordinates column vector
y-coordinates of query points, specified as a column
vector.
Data Types: double
z — z-coordinates column vector
z-coordinates of query points, specified as a column
vector.
Triangle or tetrahedra IDs of the triangles or tetrahedra enclosing the
query points, returned as a column vector. A triangle or tetrahedron ID is
the row number of the corresponding triangle or tetrahedron in the
ConnectivityList property.
If a query point lies on the boundary of two or more triangles or
tetrahedra, then the largest ID is returned.
ID contains NaN values for points
that are not located in a triangle or tetrahedron of the
triangulation.
Barycentric coordinates of each query point with respect to its enclosing
triangle or tetrahedron, returned as a 3-column matrix (2-D) or a 4-column
matrix (3-D).
Data Types: double
Extended Capabilities
Thread-Based Environment Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.