All examples By author By category About

4ndr01d3

How a Quadtree is created

How a Quadtree is created

This demo shows an animation explaining how a Quadtree is created using D3: "A quadtree is a two-dimensional recursive spatial subdivision. This implementation uses square partitions, dividing each square into four equally-sized squares."

The demo was inspired by the article on Visualizing Algorithms. To draw the points and the quadtree squares I took some code from this Example. The tree basically reuses the code of this Example.