inpolygon True for points inside or on a polygonal region.
IN = inpolygon(X,Y,XV,YV) returns a matrix IN the size of X and Y.
IN(p,q) = 1 if the point (X(p,q), Y(p,q)) is either strictly inside or
on the edge of the polygonal region whose vertices are specified by the
vectors XV and YV; otherwise IN(p,q) = 0.
[IN ON] = inpolygon(X,Y,XV,YV) returns a second matrix, ON, which is
the size of X and Y. ON(p,q) = 1 if the point (X(p,q), Y(p,q)) is on
the edge of the polygonal region; otherwise ON(p,q) = 0.
inpolygon supports non-convex and self-intersecting polygons.
The function also supports multiply-connected or disjoint polygons;
however, the distinct edge loops should be separated by NaNs. In the
case of multiply-connected polygons, the externa
inpolygon
最新推荐文章于 2023-02-18 21:03:22 发布
inpolygon是MATLAB中用于检测点是否位于多边形内部或边界上的函数。它支持非凸、自相交多边形,以及多重连接的多边形。函数返回一个指示点位置的矩阵,并能区分点在边界上还是完全在内部。提供的两个示例分别展示了自相交和多重连接的多边形应用。

最低0.47元/天 解锁文章
9416

被折叠的 条评论
为什么被折叠?



