block by dribnet 4409139

strokes version of quadtree

Full Screen

This example demonstrates accelerated two-dimensional filtering enabled by d3.geom.quadtree. A quadtree recursively subdivides square cells into four equal-sized subcells. Each leaf node of the quadtree contains a single point. If a given quadtree cell does not intersect the brush extent, then none of the points contained in that subtree can be selected, and thus do not need to be scanned. Above, orange indicates points that are scanned but not selected. Without a quadtree, all points would need to be scanned!

A fork and port of mike’s js version (gist/block), programmed in clojurescript atop the incipient strokes library.

(Merge request? Use the repo version.)

index.html

quadtree.cljs