2D polygon interior detection
版本 1.1.0.0 (24.2 KB) 作者:
Bruno Luong
Detect a whereas a point is interior or exterior to a 2D polygon
This function tries to improve the slow Matlab INPOLYGON function.
There are few other fast codes on FEX (e.g., by Darren Engwirda). After exploring many different ways, I come to the conclusion that Darren Engwirda's approach is close to optimal. So here you'll find a general method that share many common aspects, but implemented in C-Mex. I have makes few contributions: (1) a lean C-implementation, (2) Using Matlab SORT and HISTC for binning, (3) Derive an empirical rule when to apply the sorting, (4) a more rigorous on-boundary detection.
引用格式
Bruno Luong (2026). 2D polygon interior detection (https://ww2.mathworks.cn/matlabcentral/fileexchange/27840-2d-polygon-interior-detection), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2010a
兼容任何版本
平台兼容性
Windows macOS Linux类别
在 Help Center 和 MATLAB Answers 中查找有关 Elementary Polygons 的更多信息
