INPOLY: A fast points-in-polygon test
INPOLY computes the intersection between a set of points and a general polygonal region in the plane, returning the 'inside', 'outside' and 'boundary' status for each vertex. General non-convex and multiply-connected polygonal regions can be handled. INPOLY is intended as a fast replacement for MATLAB's default INPOLYGON routine.
See POLYDEMO to get started with a set of example problems:
polydemo(1); % a simple example
polydemo(2); % multiply-connected domains
polydemo(3); % speed comparison
INPOLY implements a sorted 'crossing-number' test designed to achieve fast performance for complex inputs. Given a configuration with N points and M polygon edges, INPOLY runs in approximately O((N+M)*LOG(N)) time on average, improving on the O(N*M) scaling of naive implementations.
引用
Darren Engwirda (2026). INPOLY: A fast points-in-polygon test (https://github.com/dengwirda/inpoly), GitHub. 取得日: .
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
タグ
謝辞
ヒントを与えたファイル: FINDPOLY: A fast points-in-polygons test, The Barycentric Fixed-Mass method for estimating fractal dimensions, Maximum Inscribed Circle using Voronoi Diagram, Flow Cytometry GUI for Matlab, Maximum Inscribed Circle using Distance Transform, Fast Inpolygon in MEX
