Associated graph with quadrants (path)

I read some about quadrants, and I'm trying to use them to find paths. To this end, I am trying to use the quadrant to create a linked graph, where each “minimum rectangle” (childless node) is directly connected to its neighboring minimum rectangles. To illustrate ... if you look at the lower right rectangle at http://en.wikipedia.org/wiki/File:Point_quadtree.svg , this rectangle is a childless node in the tree and it should be directly connected to the three surrounding rectangles which are also childless nodes.

Creating a quadtree is pretty simple, but I'm not sure how to find a connection to it. Can someone offer me some insight?

Thanks in advance!

+3
source share
1 answer

The bottom right rectangle is just a child of adjacent 3 rectangles. Look at it from above, like a pyramid, when you stand on top and watch how quadrants divide the space recursive into 4 directions. here is the best explanation http://blog.notdot.net/2009/11/Damn-Cool-Algorithms-Spatial-indexing-with-Quadtrees-and-Hilbert-Curves

0
source

Source: https://habr.com/ru/post/1795924/


All Articles