Quadtree Window
✓ Published0🌍 Public
This example demonstrates a spatial data structure by overlaying a quadtree visualization on a set of colored circles. Circles are placed at fixed coordinates with varying radii and opacity, and the quadtree partitions the 2D space into hierarchical rectangles. The quadtree nodes are rendered as semi-transparent white rectangles that subdivide the canvas, revealing the tree’s internal structure. Pan and zoom interactions are enabled via D3’s `zoom` behavior, which updates a transform applied to the entire group. The quadtree is built and traversed using D3’s `quadtree` API with `visitAfter` to collect node bounds.
AI-generated descriptionMIT Licensed