A quadtree recursively divides space into four quadrants until each region is uniform enough (variance below threshold).
Move sliders to see how error tolerance changes the compression — low threshold = many small cells preserving detail;
high threshold = fewer, larger cells for a painterly effect.
Draw on canvas to add your own shapes!