Build a generative art app: seeded pieces that viewers tweak and save
Generative art is a system that makes pictures: rules plus randomness, run until something interesting appears. A generative art app wraps that system in a few controls, so a viewer can explore it instead of seeing one fixed output. Anticode can write the whole thing from a description, with a seed so any piece can be made again, parameters to play with, and a way to save the result.
Seeds: the idea that makes it work
Generative art uses random numbers, but not truly random ones. A seeded random generator produces the same sequence every time it starts from the same seed, so seed 4821 always draws the same picture. That gives you three things a plain random sketch can't: you can share a favourite piece by its number, step through seeds one at a time like pages of a sketchbook, and change one parameter while keeping everything else identical, which is how you learn what each control actually does.
Ask for the seed to be visible, editable and part of the page address after the #, so a link opens exactly the piece you saw.
Systems that suit a browser canvas
- Flow fields
- Thousands of particles follow an invisible field of directions made from noise, leaving trails. Parameters: noise scale, particle count, line length, palette.
- Recursive subdivision
- A rectangle is split again and again at random points, then filled. Mondrian-like grids or dense mosaics depending on depth and colour rules.
- Circle packing
- Circles grow until they touch their neighbours. Parameters: minimum and maximum size, attempts, whether circles nest.
- Truchet tiles
- A grid of simple tiles, each rotated at random, forming continuous paths. Fast, and it looks good printed.
- Attractors
- Mathematical systems plotted as millions of points, which reveal delicate shapes. Heavier to draw; worth a progress indicator.
Pick one system and go deep rather than offering five shallow ones. Most of the character comes from the palette and the constraints, not the algorithm.
Controls and output
- A handful of sliders. Three to six parameters with names a non-coder understands ("Density", "Wobble", "Line weight").
- Palettes. A few curated sets of four or five colours, plus the option to lock one and randomise the rest.
- Regenerate and history. A big "New seed" button and a strip of recent seeds, so a lost favourite can be recovered.
- Favourites. Saved seeds and settings, kept in that browser between visits.
- Save as image. A button that saves the canvas as a PNG. Ask for a larger size option for printing, and test the saved file in your own browser.
- Animation, optionally. Watching a flow field draw itself is part of the appeal. Give a pause button, and a still result for people who ask their device for reduced motion.
Describing a piece
Describe the look as well as the system: "A generative art app: a flow field drawn with thin, slightly transparent lines on warm off-white paper, like ink. Sliders for noise scale, number of lines, line length and turbulence. Five palettes inspired by risograph inks. Seed shown and editable, kept in the address. Save as PNG at screen size or 4000 pixels wide. Draw progressively, with a pause button."
Then iterate like an artist. Ask for one change at a time ("lines should taper at the ends", "add a margin like a print"), and use version history to compare: recent saves are kept, so you can go back to the version where the texture was better and continue from there.
Practical limits
- Everything is drawn in code. Images, textures and brushes from other websites can't load. You can add your own photo with the build if a piece should start from one.
- No AI image generation inside the app. The sandbox runs no AI models; the art comes from the algorithm.
- No shared gallery. Viewers' favourites stay in their own browsers. A public wall of everyone's best seeds would need shared data, which apps don't have.
- No minting or selling. Payments and blockchain connections aren't possible from the app. If you sell prints, link to the shop or payment link you already use.
- Heavy systems are slow on phones. Millions of points or very large saves can take a while on a phone. Test on one and lower the defaults if needed.
For drawing by hand rather than by rules, see the drawing app. Making palettes is its own tool: the colour palette generator.
Questions people ask
Do I need to know creative coding?
No. Describe the system and the look in words. Knowing the names (flow field, circle packing) helps you ask for precise changes.
Can I sell prints of what the app makes?
The algorithm is yours to describe, and the outputs come from your app. Sell prints through your own shop or a payment link; the app itself can't take payment.
Can visitors make their own pieces?
Yes. Anyone with the link can change the sliders, try seeds and save images, all on their own device.