Generative art experiments (Processing, P5.js)
CostFree to Low
Includes: P5.js and Processing, both free. Example: No essential costs; both tools are completely free.
What it is
A painter controls every brushstroke. A generative artist controls only the rules, then hands the actual brushstrokes to the system and watches what emerges. Surrendering that final control, deliberately, is the whole idea, and it produces results no human would have drawn by hand.
Generative art is made using autonomous systems, algorithms, rules, and randomness, where the artist defines the process but the output is partly or wholly determined by the system running. Processing and p5.js are the canonical tools: free, open-source creative coding environments where a few dozen lines of code can produce mesmerising visual complexity. The foundational insight is that simple rules produce complex, unexpected beauty. Perlin noise generates organic flowing fields, L-systems grow plant-like branching, and cellular automata evolve intricate patterns from trivial starting conditions.
Discovering these emergent behaviours through code is one of the most exciting experiences in creative technology, and it is genuinely intellectual as much as aesthetic. A random walker, a dot that steps in a random direction each frame, is the classic first project, and it produces surprisingly lovely branching trails while teaching position tracking and randomness at once. The sweet spot every practitioner chases is constrained randomness: not pure chaos, which looks like noise, and not pure determinism, which looks mechanical, but something in between. Seeding the random functions so outputs are reproducible, then varying the seed to explore the space, is how you turn a happy accident into a controllable style.
How it works
The first generative sketches almost always look either like random noise or like a rigid mechanical pattern, and the fix is the thing nobody tells you: aim for constrained randomness, the narrow band between chaos and determinism. Pure randomness reads as visual static; pure determinism reads as wallpaper. The interesting work lives in between, where a rule has structure but a controlled amount of variation breathes life into it.
Begin in p5.js with a random walker, the classic first project: a dot that steps in a random direction each frame, leaving a trail. It teaches randomness, position tracking, and drawing all at once, and it produces surprisingly lovely branching patterns. From there, flow fields are the natural next step. You generate a grid of angles from Perlin noise, which is smooth random rather than jagged random, and let particles follow those angles, producing the flowing organic streams that define much contemporary generative art. OpenProcessing hosts thousands of sketches with visible source code to learn from and remix.
The technique that turns a happy accident into a controllable style is seeding. Seed your random number generator with a fixed value and the output becomes reproducible, so you can recreate a result you liked exactly, then vary the seed deliberately to explore the space of your algorithm. What actually happens without seeding is you generate something beautiful, fail to save it, and never produce it again, which every generative artist learns the hard way once.
Benefits
What you need
Here's what to gather before you start. The essentials are marked.
FAQs
Art where you write rules and let code produce the image, often with an element of randomness. Instead of drawing the final picture, I describe a process: draw a thousand lines following these constraints, vary the colour by this rule, nudge each point a little randomly. The computer runs it and surprises me. The output emerges from the system rather than being placed by hand.
No, just comfortable with the basics. Loops, variables, and a little randomness take you a remarkably long way. p5.js and Processing are built for artists, so the code reads simply and you see results instantly. I came in barely able to code and learned what I needed because I wanted a specific visual effect, which is a far better motivator than working through abstract exercises.
Usually too much randomness and not enough constraint. Pure randomness looks like static; beauty comes from controlled variation around a structure. I learned to seed randomness within tight limits, repeat elements with small differences, and use colour palettes rather than random colours. The interesting work lives in the tension between order and chaos, not in pure either one.
Both, easily. Because the art is generated at any resolution, I export huge versions for large-format prints that look razor-sharp. Generative art was also central to the NFT scene, where each run of the code produces a unique output. I mostly print mine, since holding a physical piece I grew from a few rules feels more rewarding than a token, but the option is there either way.