The geometry behind the shapes

A few points.
A whole new map.

Choose a set of points. Give every location to the point nearest to it. The resulting regions form a Voronoi diagram—the kind of map used by Color Theorem.

Move a point and watch its region change

Drag one of the numbered seed points. With a keyboard, focus a seed and use the arrow keys to move it. The colors are assigned automatically in this demonstration.

Interactive Voronoi mapSix seed points divide a rectangle into nearest-point regions. Drag a seed, or focus it and use arrow keys. A graph overlay can show which regions share edges.

Loading the interactive controls…

The nearest point wins

Imagine two seed points on an empty sheet. Locations on one side are nearer to the first point; locations on the other side are nearer to the second. Their shared boundary sits halfway between the points.

With several seeds, each point competes with all the others. Its region is the intersection of the places where it is closer than every competitor. In an ordinary planar Voronoi diagram, these cells are convex polygons, clipped here to the rectangular board.

Where do shared edges come from?

Along a shared edge, locations are equally close to the two neighboring seeds and no closer to another seed. Moving one seed shifts some of these boundaries. As the points move, a short edge can disappear and a different pair of regions can become neighbors.

That is why rearranging the points can change the puzzle even when the number of shapes stays the same. Shape count alone does not determine all the map’s constraints.

From regions to a graph

Turn on Show graph to connect the seed points of regions sharing an edge. Each seed stands for a region; a line stands for a neighbor relationship. Corner-only contact adds no line.

This gives a graph-coloring view of the same problem. The game asks you to choose colors so that connected vertices differ. The four color theorem explains why four colors are enough for the planar maps used here.

From this demonstration to a puzzle

The demonstration chooses a valid coloring for you so you can concentrate on the geometry. In Color Theorem, choosing the colors is your task.

Try moving the seeds into a tight cluster, spreading them toward the corners, or sliding one along an edge. Watch the boundaries and the graph together, then look for those relationships when you next play.

Ready for a map?

Four colors. One shared-edge rule.

Play Color Theorem