campreilly / UnderSeaModelingLibrary

The Under Sea Modeling Library (USML) is a collection of C++ software development modules for sonar modeling and simulation.
Other
44 stars 22 forks source link

Use quadtrees to improve efficiency of eignverb collision detection in reverb model #107

Closed campreilly closed 9 years ago

campreilly commented 9 years ago

A quadtree (http://en.wikipedia.org/wiki/Quadtree) is a tree data structure that supports efficient searches in two-dimensional space. Quadtrees are frequently used in game design to improve the efficiency of collision detection in two dimensions. If we were to store our eigenverbs in quadtrees, if might have a significant impact on the efficiency of searching for "impacts" between source and receiver eigenverbs.

This is going to take some serious research and design on our part before we are ready to begin coding?

Tibonium commented 9 years ago

Noting here that width/height of eigenverbs are now a function of frequency and so the logic for choosing collisions is more difficult than had they been frequency independent, which they shouldn't but were at the time.

campreilly commented 9 years ago

Perhaps we can use the fact that the widths should always the largest at the lowest frequencies to mitigate this effect. We tried this in the past with intensity thresholds, and that had problems. But the equations for width (wave-queue.cc lines 1068-1087) really do appear to be monotonically increasing with frequency.

campreilly commented 9 years ago

While searching for some guidance on quad_trees, I ran into an interesting discussion of the boost::geometry::index::rtree class as a scheme for storing and querying 2-D data.

Discussion: http://stackoverflow.com/questions/16824386/any-good-range-query-libraryusing-k-d-tree-quad-tree-or-r-tree-in-c

Example: http://www.boost.org/doc/libs/1_54_0/libs/geometry/doc/html/geometry/spatial_indexes/rtree_examples/specializing_index__indexable_function_object___storing_shared_pointers_in_the_rtree.html

islanderjtn commented 9 years ago

Implemented eigenveb collision detection using Boost RTrees. See Pull Request 229.