Fast InPolygon detection MEX

Fast detection points inside a polygonal region
2,8K téléchargements
Mise à jour 21 août 2008

Afficher la licence

Fast detection points inside a polygonal region.
To my knowlegde, the code is faster than all the inpolygon functions found on MatLab File Exchange

[IN,ON,IN_strict] = InPolygon(px,py,cx,cy);

input: px - nPM x nPN (Matrix) X-coordinates of the points to be tested
py - nPM x nPN (Matrix) Y-coordinates of the points to be tested
cx - nC x 1 (Vector) X-coordinates of the polygon
cy - nC x 1 (Vector) Y-coordinates of the polygon
output:
IN - boolean matrix of 1 if px(i,j),py(i,j) is
in or on the polygon defined by cx,cy
ON - boolean matrix of 1 if px(i,j),py(i,j) is
on the polygon defined by cx,cy
IN_strict - boolean matrix of 1 if px(i,j),py(i,j) is
exclusively in the polygon defined by cx,cy

Citation pour cette source

Guillaume JACQUENOT (2026). Fast InPolygon detection MEX (https://fr.mathworks.com/matlabcentral/fileexchange/20754-fast-inpolygon-detection-mex), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R14
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Elementary Polygons dans Help Center et MATLAB Answers

InPolygon-MEX/

Version Publié le Notes de version
1.0.0.0

Two bugs fixed