A quadtree is a special type of data structure which can be used in graphical applications when there are lots of points and you want to find a set of points in a region. In a quadtree, the canvas is divided into squares based on the density of points, so areas with more points will have more squares. This way is much quicker to find points in a region such as around the cursor, as you don't have to search every point, just only the squares which intersect with the cursor region.
Interact with the Simulation
Move your cursor and the identified points will be highlighted. Hold down the mouse to add more points.