Search code examples
octree

Range search within specified radius in an Octree


I am interested in particle algorithms like the N-Body, and SPH. One of the important steps in these applications is, given a query point, to find the particles lying within a specified sphere of radius 'h'.

Now I have heard that Octrees are good spatial data structures for problems like N-body or SPH.

But after the octree construction, I cannot understand how the "locate particles within a radius" step is performed . Can someone please point me to some references, papers or articles for doing this step?


Solution

  • k-d trees are also good data structures to use for this and are commonly used for nearest neighbor searches.