Skip to content

Starter guide

Generative Art

Write a few lines of code and let the rules draw for you.

You can start generative art today in a web browser on the computer you already have, for free. Generative art is art made by writing a set of rules, usually a short program, and letting the computer carry them out: a loop that scatters a thousand lines, or a bit of randomness that bends them. You design the system and tune it until the results surprise you. It is not AI image generation: there is no prompt and no trained model, just code you wrote and understand line by line. Beginners usually start with p5.js or Processing, free tools built for artists, and most go from a blank screen to a first finished piece in an evening.

Difficulty
Moderate learning curve
Startup cost
$5-$100
First result
Your first finished piece in an evening
Circle packing: grow until it fits

Start free

Draw your first coded sketch in five minutes, free

Open the p5.js Web Editor in your browser, sign up for a free account so your sketches save, and change the numbers in the starter code to draw your first shapes. Nothing to install.

01

What generative art actually is

A generative piece is a small program with an artistic goal. You write rules for what to draw and where (a loop over a grid, a particle that moves a little each frame), add controlled randomness, and run it. Each run with a new random seed gives a new variation, so much of the work is tuning: nudging a number, rerunning, and keeping the outputs you like. The difference from AI image tools is the whole point. An AI model turns a text prompt into a picture it learned from other images; in generative art you author the process yourself, so you can explain every mark on the screen and change it on purpose. You need only beginner-level code (variables, loops, if statements) and a little geometry.

A laptop at an angle showing colorful code in a dark editor, lit by a violet glow
Colorful code in a dark editor, lit violet
02

Directions to explore

Creative codingSketches in p5.js or Processing that draw shapes, patterns and animations. This is where nearly everyone starts, and it needs nothing beyond a computer.

Start here

Pick one rule (a grid of shapes, a random walk, or circles that grow until they touch), code it in the p5.js Web Editor, and make ten variations by changing one number at a time.

Shader CodingTiny programs that run on the graphics card and color every pixel at once, written in a language called GLSL. Fast, mathematical and very rewarding once it clicks.

Start here

Work through the first five chapters of The Book of Shaders in its in-browser editor, then remix one Shadertoy example by changing its colors and speed.

The Book of Shaders
Live VisualsInteractive or audio-reactive pieces you perform with a hardware controller, for music nights, installations or just playing with your own sketches.

Start here

Map three sliders or knobs to three variables in one of your sketches (size, speed, color) and play it live while music runs, so you tune the piece by hand instead of by retyping.

Open a card for its first step. Creative coding runs on the base kit; Shader Coding and Live Visuals each end in a button that adds their gear to the kit.

A burst of pink, violet and cyan particle streaks scattered across a black background
03

Your first week

Seven steps in the free web editor

What you can make in your first month

A randomized grid

Rows of shapes where each cell picks its size, rotation or color by chance, the classic first generative piece.

A flow field

Thousands of short lines that follow a smooth noise pattern, which teaches you Perlin noise and looks far harder than it is.

A circle-packing piece

Circles that grow until they touch a neighbor, a gentle first lesson in loops and collision checks.

A print-ready edition

One sketch exported at high resolution in five seeded variations, so you can pick the best and print it.

04

Skills to build early

Loops and arrays

Almost every piece repeats one idea many times, so get comfortable with for loops and storing many objects.

Randomness and noise

Learn when pure randomness looks right and when smooth noise looks more natural.

Basic geometry

Angles, sine and cosine, and distance between points let you place things in circles, spirals and waves.

Color

Pick small palettes and work in HSB color mode, which lets you shift hue or brightness with one number.

Editing your outputs

Generate many variations, then be ruthless about which ones are actually good.

A dense field of wavy, noise-driven marks in cyan, magenta and yellow
Noise, not pure randomness, gives marks that flow together
05

What trips beginners up

  • Your first pieces will look like everyone else's first pieces (random circles, flow fields). That is normal; personal style comes from tweaking rules over weeks.
  • Bugs are part of the medium. A blank canvas usually means a typo or a shape drawn off screen, so check the console before anything else.
  • Sketches can slow to a crawl with too many shapes per frame. Use noLoop() to draw a still image once instead of 60 times a second.
  • Math can look intimidating, but you only need it a piece at a time. Learn sine and cosine when you want a circle, not before.
  • Skipping the seed means losing a great variation forever. Set and print the seed from your first week.
  • Copying tutorial code without changing it teaches little. After each tutorial, change three things and see what breaks.
  • Posting only the single best output hides your process. Grids of variations are what other generative artists like to see.
06

Where to learn

The Coding Train has hundreds of free, beginner-friendly video lessons in p5.js and is the most common starting point. The Nature of Code is a free online book that turns physics and biology into drawing systems once loops feel natural. OpenProcessing lets you open thousands of other people's sketches and remix them, and the yearly Genuary challenge gives a daily prompt every January with a big community posting results. Processing, the desktop tool p5.js grew from, has its own free tutorials if you prefer an app to a browser.

07

Why the kit is so small

The tools are free, so the only purchase most beginners make is one good book that teaches the ideas in order instead of piecing them together from videos. For the computer, any laptop or desktop from the last several years that runs a current browser is enough; a tablet or phone works for viewing sketches but is awkward for typing code. A shader book only matters if you head into shader coding, and a small MIDI controller only if you want to play your sketches live. Fine-art paper is for the day you want a framed print of a favorite output; screen-only work never needs it.

Visitors walking through a room-filling projection of drifting violet and pink points of light
A room-scale projection of drifting points of light
08

Set up your kit

Compare the options on each line, then set your tiers in the cart. Clicking a card selects it there, and clicking the selected card again takes that line out. The book starts in the kit; the shader book and the MIDI controller wait behind the Shader Coding and Live Visuals extensions, and the art paper is an optional extra that starts Out.

Beginner creative coding book

Recommended · Learning

A book teaches drawing with code in a sensible order, so you build on each idea instead of jumping between unrelated video tutorials.

budget
Getting Started with p5.js: Making Interactive Graphics in JavaScript and Processing (Make: Technology on Your Time)

Getting Started with p5.js: Making Interactive Graphics in JavaScript and Processing (Make: Technology on Your Time)

4.6(231)

$5.46

View on Amazon
mid-range
The Nature of Code: Simulating Natural Systems with JavaScript

The Nature of Code: Simulating Natural Systems with JavaScript

4.7(109)

$23.48

View on Amazon
premium
Generative Design: Visualize, Program, and Create with JavaScript in p5.js

Generative Design: Visualize, Program, and Create with JavaScript in p5.js

4.5(98)

$54.97

View on Amazon

Pick one. Books written around p5.js match the free web editor most closely; Processing books still apply because the two use nearly the same functions.

Shader programming book

Situational · LearningExtension: Shader Coding

Shaders work very differently from ordinary drawing code, and a book explains the graphics pipeline and the math behind it in one place.

budget
OpenGL 4 Shading Language Cookbook: Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++17, 3rd Edition

OpenGL 4 Shading Language Cookbook: Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++17, 3rd Edition

4.5(42)

$42.91

View on Amazon
mid-range
Practical Shader Development: Vertex and Fragment Shaders for Game Developers

Practical Shader Development: Vertex and Fragment Shaders for Game Developers

4.2(29)

$49.99

View on Amazon

Read a few chapters of the free online shader guide first, so you know you enjoy it before buying. Shader books are written for desktop graphics programmers and use C-style code, but the shader language and math carry straight over to shaders in the browser.

USB MIDI controller with knobs and sliders

Situational · HardwareExtension: Live Visuals

Physical knobs and sliders let you change a sketch's variables while it runs, which is how live visuals are performed and a much faster way to tune a piece.

budget
Vangoa Wireless MIDI Controller Mixer, USB MIDI Keyboard for PC & Mac

Vangoa Wireless MIDI Controller Mixer, USB MIDI Keyboard for PC & Mac

3.9(1.3K)

$49.99

View on Amazon
mid-range
Korg nanoKONTROL2 Slim-Line USB Control Surface, Black

Korg nanoKONTROL2 Slim-Line USB Control Surface, Black

4.7(2.6K)

$67.56

View on Amazon
premium
Akai Professional MIDImix USB MIDI Mixer Controller

Akai Professional MIDImix USB MIDI Mixer Controller

4.3(1.5K)

$109.00

View on Amazon

Choose a class-compliant model that works over plain USB without drivers. Browsers read it through the Web MIDI API in Chrome and Edge.

Matte fine art inkjet paper

Optional · Printing

Fine, detailed linework looks muddy on plain office paper; a heavy matte art paper keeps thin lines crisp when you print a favorite piece for the wall.

budget
Canon PM-101 Photo Paper Pro Premium Matte (8.5 x 11", 50 Sheets)

Canon PM-101 Photo Paper Pro Premium Matte (8.5 x 11", 50 Sheets)

4.6(946)

$17.19

View on Amazon
mid-range
Epson Velvet Fine Art Paper (8.5x11 Inches, 20 Sheets) (S041636), White

Epson Velvet Fine Art Paper (8.5x11 Inches, 20 Sheets) (S041636), White

4.7(903)

$38.00

View on Amazon
premium
Hahnemuhle Photo Rag Paper 8.5"x11" - 25 sheets 10641430

Hahnemuhle Photo Rag Paper 8.5"x11" - 25 sheets 10641430

4.5(10)

$44.95

View on Amazon

Only worth buying if you own an inkjet printer. Otherwise upload your high-resolution export to a local print shop or online printing service.