How do I make generative art?
Write code that combines a few simple rules with controlled randomness, so the program draws a new artwork every run, then tune it until it looks right.
Generative art uses a small set of techniques again and again:
- Color as numbers: HSL describes a color by hue, saturation and lightness, so turning the hue gives palettes that go together.
- Loops and math: one loop and a little geometry draw grids, rings and spirals.
- Smooth randomness: noise and easing give flowing, natural shapes instead of static.
- Particles: many tiny dots following simple rules look like fireworks or swarms.
- Symmetry: rotating and mirroring points turns scribbles into kaleidoscopes.
- Seeds: a seeded random generator makes the same artwork from the same number, so you can keep your favorites.
You can draw on an HTML canvas, build crisp vector images with SVG, or animate with CSS. Interaction, like shapes that follow the pointer, makes a piece feel alive. Respect visitors who prefer reduced motion.
AI is a strong assistant if you direct it like an art director: describe the mood, palette, composition and motion you want, then read the code it writes, because small math mistakes scramble colors and shapes.
Vumbli's Creative Coding & Generative Art track starts with "Make generative art in 60 seconds with AI", covers palettes, patterns, noise, particles, symmetry and SVG, and ends with a poster generator that makes a new design from every seed.
Start with these missions
- Make generative art in 60 seconds with AI (Creative Coding & Generative Art)
- Colors as numbers: HSL & palettes (Creative Coding & Generative Art)
- Patterns from loops: grids, rings & sunflowers (Creative Coding & Generative Art)
Tracks that teach it
More questions, answered by building