Voronoi image 1
Voronoi image 2
Voronoi image 4
Voronoi image 5
Voronoi image 7
Voronoi image 8
Voronoi image 9
Voronoi image 10

The goal of this project is to turn a Voronoi diagram into a painting.1 The images above show a few different stages of that process.2 I use d3.Delaunay to build the Voronoi diagram, then discard tiny cells and compute the centroid of each remaining polygon. That gives me a dense field of irregular patches that can still be treated as individual brush marks.

Color

Color assignment is a big part of what makes the image feel harmonious. First, I use noise to split the canvas into light, mid, and dark regions, which creates a broad value structure across the piece. Then I build the cell adjacency graph from the Delaunay neighbors and grow random clusters through nearby cells, so adjacent polygons often share the same base color instead of flickering independently.

Each cluster pulls from a small HSL palette, with a bit of hue, saturation, and lightness jitter to keep the colors from looking flat. You can see that in the images at the top: even when the shapes get denser, the colors still fall into larger warm and cool areas instead of turning noisy.

Edges

Another important part was making the shapes feel less sharp. In the earlier images, the cells are still easy to read and the boundaries are much more visible. In the middle images, once the shapes start overlapping more, the edges are still relatively sharp, so they look more like confetti.

To move away from that, I make each polygon expand beyond its original cell and draw it with very low opacity. That creates much heavier overlap, so the boundaries start to dissolve into each other. In the last images, the blending gets closer to a watercolor effect, although if the overlap is pushed too far, the structure starts to disappear.

I also added a couple of simple controls while tuning the output: press R to regenerate a new composition, and use [ or ] to change how far each shape expands before it is drawn.

  1. This project was inspired by this work by Tyler Hobbs

  2. This post was co-written with Codex.