How Random Seeds Create Reproducible Artwork

Every artwork in the Espiralito gallery is defined by a single number: its seed. Change the seed and the entire composition changes. Keep it the same and the artwork is identical โ€” on any device, in any browser, at any time. This is the magic of deterministic generation, and it all comes down to how pseudorandom number generators work.

What Is a Random Seed?

A random seed is the starting value for a pseudorandom number generator (PRNG). A PRNG is an algorithm that produces a sequence of numbers that look random but are actually completely determined by their starting value.

Think of it like a recipe: the seed is the list of ingredients, and the PRNG is the cooking process. The same ingredients and the same process always produce the same dish. Change one ingredient and you get something different.

How a PRNG Works

Espiralito uses a PRNG called Mulberry32. Given a 32-bit seed, it produces a sequence of numbers between 0 and 1. The algorithm is a series of bitwise operations and multiplications:

t = seed + 0x6D2B79F5 โ†’ apply a series of XOR and shift operations โ†’ output a fraction

The critical property is determinism: the same seed always produces the same sequence, in the same order, forever. This is what makes reproducible artwork possible.

From Seed to Artwork

In Espiralito, the seed feeds two systems:

Because both systems are deterministic, the entire artwork is a pure function of the seed and the parameters. No hidden randomness, no device-specific behavior, no time-dependent values. The output is mathematically guaranteed to be identical every time.

Why This Matters for Artists

Deterministic generation gives artists several practical superpowers:

How Espiralito Encodes the Recipe

When you share an Espiralito artwork, the URL contains a compact 36-character code. This code encodes the seed and every parameter โ€” dot count, spacing, symmetry, palette, effects, and more. The codec is versioned, so even as the generator evolves, old URLs continue to reproduce their original artwork.

This is why the gallery can offer permanent URLs for every artwork: the URL is not a reference to a stored file, but a complete recipe that regenerates the artwork on demand.

Randomness vs Determinism

It might seem contradictory that "random" seeds produce "deterministic" art. The resolution is that the seed is random in choice but deterministic in effect. When you hit Randomize, the generator picks a seed from 4 billion possibilities โ€” that's the random part. But once the seed is chosen, every subsequent step is fixed.

This gives you the best of both worlds: the surprise and variety of randomness, plus the reliability and reproducibility of determinism.

Try It Yourself

Open the generator, create an artwork, and copy its share URL. Open the URL in a different browser or on your phone โ€” the artwork will be identical. Then change one digit in the seed and watch the entire composition transform.