| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
Simplex containing specified location
SI = pointLocation(DT,QX)
SI = pointLocation(DT,QX,QY)
SI
= pointLocation(DT,QX,QY,QZ)
[SI, BC] = pointLocation(DT,...)
SI = pointLocation(DT,QX) returns the indices SI of the enclosing simplex (triangle/tetrahedron) for each query point location in QX. The enclosing simplex for point QX(k,:) is SI(k). pointLocation returns NaN for all points outside the convex hull.
SI = pointLocation(DT,QX,QY) and SI = pointLocation(DT,QX,QY,QZ) allow the query point locations to be specified in alternative column vector format when working in 2-D and 3-D.
[SI, BC] = pointLocation(DT,...) returns the barycentric coordinates BC.
| DT | Delaunay triangulation. |
| QX | Matrix of size mpts-by-ndim, mpts being the number of query points. |
| SI | Column vector of length mpts containing the indices of the enclosing simplex for each query point. mpts is the number of query points. |
| BC | BC is a mpts-by-ndim matrix, each row BC(i,:) represents the barycentric coordinates of QX(i,:) with respect to the enclosing simplex SI(i). |
Create a 2-D Delaunay triangulation:
X = rand(10,2); dt = DelaunayTri(X);
Find the triangles that contain specified query points:
qrypts = [0.25 0.25; 0.5 0.5]; triids = pointLocation(dt, qrypts)
Create a 3-D Delaunay triangulation:
x = rand(10,1); y = rand(10,1); z = rand(10,1); dt = DelaunayTri(x,y,z);
Find the triangles that contain specified query points and evaluate the barycentric coordinates:
qrypts = [0.25 0.25 0.25; 0.5 0.5 0.5]; [tetids, bcs] = pointLocation(dt, qrypts)
![]() | plotyy | pol2cart | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |