This implementation is based on the paper:
S. F. Frisken and R. N. Perry,
``Simple and Efficient Traversal Methods for Quadtrees and Octrees,''
Journal of Graphics Tools, 2002, Vol. 7, pg. 1-11
This Quadtree class seems to beat MATLAB's KDTree class for speed, both in creating the tree and when doing k-nearest neighbor searches.
Note: it is possible to extend this code to an Octree.
Shawn Walker (2023). MATLAB class wrapper for a C++ implementation of a Quadtree (https://www.mathworks.com/matlabcentral/fileexchange/45020-matlab-class-wrapper-for-a-c-implementation-of-a-quadtree), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: Example MATLAB class wrapper for a C++ class
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!