All Projects → dengwirda → inpoly

dengwirda / inpoly

Licence: other
A fast 'point(s)-in-polygon' test for MATLAB.

Programming Languages

matlab
3953 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to inpoly

point-in-polygon-hao
A point in polygon library based on the paper "Optimal Reliable Point-in-Polygon Test and Differential Coding Boolean Operations on Polygons" by Hao
Stars: ✭ 83 (+388.24%)
Mutual labels:  computational-geometry, point-in-polygon
tektosyne
The Tektosyne Library for Java provides algorithms for computational geometry and graph-based pathfinding, along with supporting mathematical utilities and specialized collections.
Stars: ✭ 52 (+205.88%)
Mutual labels:  computational-geometry, point-in-polygon
Clubber
Application of music theory in audio reactive visualizations
Stars: ✭ 325 (+1811.76%)
Mutual labels:  octave
Gpstuff
GPstuff - Gaussian process models for Bayesian analysis
Stars: ✭ 106 (+523.53%)
Mutual labels:  octave
Textplayer
A library to play MML and ABC songs, written in C#
Stars: ✭ 29 (+70.59%)
Mutual labels:  octave
Machine Learning Octave
🤖 MatLab/Octave examples of popular machine learning algorithms with code examples and mathematics being explained
Stars: ✭ 637 (+3647.06%)
Mutual labels:  octave
Orca
Ordinal Regression and Classification Algorithms
Stars: ✭ 72 (+323.53%)
Mutual labels:  octave
Programming
Code a program in a language of your choice.
Stars: ✭ 269 (+1482.35%)
Mutual labels:  octave
Facerecognition guide
This is a guide to face recognition with Python, GNU Octave/MATLAB and OpenCV2 C++. Eigenfaces and Fisherfaces are explained in detail and implemented.
Stars: ✭ 188 (+1005.88%)
Mutual labels:  octave
Matlab Rinex Reader
Fixed old Kai Borre Matlab code to run in Octave and hence be callable by Python to work with RINEX data
Stars: ✭ 9 (-47.06%)
Mutual labels:  octave
Octsympy
A Symbolic Package for Octave using SymPy
Stars: ✭ 92 (+441.18%)
Mutual labels:  octave
Fcm
A simple implementation of the Fuzzy C-Means Clustering (FCM) in MATLAB/GNU-Octave.
Stars: ✭ 26 (+52.94%)
Mutual labels:  octave
Casadi
CasADi is a symbolic framework for numeric optimization implementing automatic differentiation in forward and reverse modes on sparse matrix-valued computational graphs. It supports self-contained C-code generation and interfaces state-of-the-art codes such as SUNDIALS, IPOPT etc. It can be used from C++, Python or Matlab/Octave.
Stars: ✭ 714 (+4100%)
Mutual labels:  octave
Pandoc Plot
Render and include figures in Pandoc documents using your plotting toolkit of choice
Stars: ✭ 75 (+341.18%)
Mutual labels:  octave
Vot Toolkit
Visual Object Tracking (VOT) challenge evaluation toolkit
Stars: ✭ 360 (+2017.65%)
Mutual labels:  octave
Jidt
JIDT: Java Information Dynamics Toolkit for studying information-theoretic measures of computation in complex systems
Stars: ✭ 145 (+752.94%)
Mutual labels:  octave
Gcc termux
Gcc for termux with fortran scipy etc... Use apt for newest updates instructions in README.txt
Stars: ✭ 276 (+1523.53%)
Mutual labels:  octave
Facerec
Implements face recognition algorithms for MATLAB/GNU Octave and Python.
Stars: ✭ 921 (+5317.65%)
Mutual labels:  octave
Matlab2tikz
This program converts MATLAB®/Octave figures to TikZ/pgfplots figures for smooth integration into LaTeX.
Stars: ✭ 1,041 (+6023.53%)
Mutual labels:  octave
Tinfour
Delaunay and Constrained Delaunay Triangulations in Java, providing high-performance utilities for modeling surfaces with support for Lidar LAS files, Digital Elevation Models (DEM), finite element analysis, path planning, natural neighbor interpolation, and other applications of Triangulated Irregular Networks (TIN)
Stars: ✭ 119 (+600%)
Mutual labels:  computational-geometry

INPOLY: Fast point(s)-in-polygon queries in MATLAB

A fast 'point(s)-in-polygon' routine for MATLAB / OCTAVE.

INPOLY returns the "inside/outside" status for a set of vertices VERT and a general polygon (PSLG) embedded in the two-dimensional plane. General non-convex and multiply-connected polygonal regions can be handled. INPOLY is intended as a (very) fast replacement for MATLAB's default INPOLYGON routine.

INPOLY is based on a 'crossing-number' test, counting the number of times a line extending from each point past the right-most region of the polygon intersects with the polygonal boundary. Points with odd counts are 'inside'. A simple implementation requires that each edge intersection be checked for each point, leading to (slow) O(N*M) overall complexity.

This implementation seeks to improve these bounds. Query points are sorted by y-value and candidate intersection sets are determined via binary-search. Given a configuration with N test points, M edges and an average point-edge 'overlap' of H, the overall complexity scales like O(M*H + M*LOG(N) + N*LOG(N)), where O(N*LOG(N)) operations are required for the initial sorting, O(M*LOG(N)) operations are required for the set of binary-searches, and O(M*H) operations are required for the actual intersection tests. H is typically small on average, such that H << N. Overall, this leads to fast O((N+M)*LOG(N)) complexity for average cases.

Quickstart

After downloading and unzipping the current repository, navigate to the installation directory within MATLAB / OCTAVE and run the set of examples contained in polydemo.m:

polydemo(1); % a simple example
polydemo(2); % multiply-connected domains
polydemo(3); % speed comparison

For good performance in OCTAVE, INPOLY can be compiled from C++ as an *.oct file. See documentation on MKOCTFILE for additional information. Typically, MATLAB's in-built JIT-acceleration leads to good performance by default.

License Terms

This program may be freely redistributed under the condition that the copyright notices (including this entire header) are not removed, and no compensation is received through use of the software. Private, research, and institutional use is free. You may distribute modified versions of this code UNDER THE CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution of this code as part of a commercial system is permissible ONLY BY DIRECT ARRANGEMENT WITH THE AUTHOR. (If you are not directly supplying this code to a customer, and you are instead telling them how they can obtain it for free, then you are not required to make any arrangement with me.)

DISCLAIMER: Neither I nor the University of Sydney warrant this code in any way whatsoever. This code is provided "as-is" to be used at your own risk.

References

[1] - J. Kepner, D. Engwirda, V. Gadepally, C. Hill, T. Kraska, M. Jones, A. Kipf, L. Milechin, N. Vembar: Fast Mapping onto Census Blocks, IEEE HPEC, 2020.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].