What Do Four Numbers Do
Click morph to cycle presets · random for chaos
Pick four decimal numbers. Call them a, b, c, d. Start at the origin. Run this loop 800,000 times:
x_next = sin(a * y) + c * cos(a * x)
y_next = sin(b * x) + d * cos(b * y)
Those two lines produce one point with every iteration. Plot all of them and a filamentary structure emerges, organic and almost biological. Clifford Pickover published this system in the early 1990s, and creative coders have been exploring it since.
Why it looks like anything at all
The sine and cosine terms fold space back on itself. The point can never escape to infinity because sin and cos are bounded. So the trajectory stays trapped in a region roughly four units wide, visiting some spots over and over while barely touching others. That uneven visitation pattern is the image.
Density rendering
If you plot each point as a white dot, you get a smear. Counting hits per pixel and mapping the count to brightness preserves the filaments. More visits means brighter. We use a log scale so the hotspots don't blow out the dim filaments:
brightness = log(hits + 1) / log(max_hits + 1)
Then map that 0-to-1 value into a color ramp. Ours goes from near-black through purple to pink to white. The result looks like something you'd see under a microscope.
Sensitivity to parameters
Change a from -1.4 to -1.7 and the shape transforms completely. Some parameter sets produce tight spirals, others spread into feathery wings, and a few collapse into boring blobs. The morph button interpolates between known-good presets, and the random button rolls the dice on all four values. Most random picks produce something interesting, while the empty results remain part of the appeal.
What I like about this piece
I like how little it needs: two lines of trigonometry, four constants, and enough iterations for the structure to appear.
Clifford Attractor
800,000-point density rendering of the Clifford strange attractor, parameterized by four constants.
View artifact →