Computer art based on quadtrees.
The program targets an input image. The input image is split into four quadrants. Each quadrant is assigned an averaged color based on the colors in the input image. The quadrant with the largest error is split into its four children quadrants to refine the image. This process is repeated N times.
The first animation shows the natural iterative process of the algorithm.
The second animation shows a top-down, breadth-first traversal of the final quadtree.
Subscribe to Python Awesome
Get the latest posts delivered right to your inbox