From Genome to Image

Every image starts as a random math formula. You pick the ones worth keeping, and Galápagos breeds the next generation. Here's how that works.

1 · Building Blocks

Every formula is built from three kinds of pieces. Click any chip to learn what it does.

Terminals — leaves of the tree
Unary ops — one child
Binary ops — two children
Ternary ops — three children
Click a chip above to see its definition.

2 · Growing a Tree

A genome grows by picking operations at random and chaining them into a tree, one node at a time.

— nodes
Click "Roll New Tree" to begin

3 · Tree → Image

To draw a pixel, the tree runs once with that pixel's coordinates as input. The answer becomes a color.

Expression from §2 · grayscale

How each pixel is computed

1
Map pixel (px, py)x, y ∈ [−1, 1]
2
Evaluate every node in the tree using those coordinates
3
Normalize the output: (sin(v) + 1) / 2 → [0, 1]
4
Assign the value to the pixel: gray = v × 255
5
In Galápagos, three trees drive H, S, V — see §4

4 · Coloring

Three separate trees control the hue, saturation, and brightness of every pixel. A remap tree then fine-tunes each channel's range before the final color is set.

The HSV Color Model

Each pixel is colored by three numbers. Drag the sliders to explore each dimension — the swatch shows the combined result.

HHue — which color on the spectrum
SSaturation — grey (0) to vivid (1)
VValue — black (0) to full brightness (1)
H=0.55
S=0.80
V=0.90
Hue — the color angle: 0=red · 0.17=yellow · 0.33=green · 0.5=cyan · 0.67=blue · 0.83=magenta · 1=red again.
Saturation — how vivid the color is: 0 is pure grey, 1 is fully saturated.
Value — brightness: 0 is black no matter the hue, 1 is full brightness.

Channel Remapping

The spatial tree outputs a number at each pixel. A separate remap tree intercepts that number and bends the range before it becomes a color. The colored bar shows what the remap produces; the curve shows how input maps to output; the dashed diagonal is identity (no change).

H
S
V

Three channels, one image

H — Hue
S — Saturation
V — Value
Combined HSV → RGB
All three channels combined into one full-color image.

5 · Evolution

Crossover stitches a branch from one parent into another. Mutation replaces a random branch with something new.

Settings — applied to both Crossover and Mutate

Replaces a random subtree with a freshly grown one. Used by both Crossover and Mutate.
Crossover: how deep the swap point can be. Mutate: how deep the replacement grows. 1 = near the root, 5 = near the leaves.

Parent A

Parent B

Child

Press Crossover or Mutate