Generative art and cellular automata lesson plan
Turn a 16x16 LED panel into a night sea in C++ on an ESP32-C3: the Game of Life, random walks, L-systems, noise, flocking fish and a living light wall.
Objectives and materials
By the end, students can
- Cellular automata and random walks: simple rules, rich results.
- Plants from rewriting rules and a tide from noise.
- A school of fish from three rules, and the grid under it all.
- Everything on one living light wall.
Materials for the whole unit
- Addressable RGB LEDs
- ESP32-C3-DevKitM-1
- Full-size breadboard
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
Rules and chance
Cellular automata and random walks: simple rules, rich results.
| Lesson | Time | What students do |
|---|---|---|
| Game of LifeConway's two rules on a 16x16 torus of LEDs: a plankton bloom from five cells, rules as bitmasks, and a fingerprint that notices when the colony settles. | 40 min |
|
| Random walksPlankton that drift by coin flips, a random number generator in three shifts, fading trails, and 64 invisible walkers that check the square root law of diffusion. | 50 min |
|
Materials
- Addressable RGB LEDs
- ESP32-C3-DevKitM-1
- Full-size breadboard
Check for understanding
Each student finishes "Random walks" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A swarm".
Growth and texture
Plants from rewriting rules and a tide from noise.
| Lesson | Time | What students do |
|---|---|---|
| L-systemsKelp from a rewriting rule: a string that grows every generation, and a turtle with a stack that turns its symbols into branches. | 40 min |
|
| Noise fieldsValue noise in integer math: a hashed lattice, smoothstep blending and octaves make a drifting bioluminescent tide, measured against plain random static. | 40 min |
|
Materials
- Addressable RGB LEDs
- ESP32-C3-DevKitM-1
- Full-size breadboard
Check for understanding
Each student finishes "Noise fields" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Octaves".
Swarms and space
A school of fish from three rules, and the grid under it all.
| Lesson | Time | What students do |
|---|---|---|
| FlockingTwelve fish, three local rules and no leader: separation, alignment and cohesion, and an order number that shows a school appear out of a swarm. | 35 min |
|
| Mapping a matrixFrom x and y to a place on one long wire: serpentine rows, the function every lesson has leaned on, and rotation for free. | 40 min |
|
Materials
- Addressable RGB LEDs
- ESP32-C3-DevKitM-1
- Full-size breadboard
Check for understanding
Each student finishes "Mapping a matrix" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Rewire it straight".
Project
Everything on one living light wall.
| Lesson | Time | What students do |
|---|---|---|
| Project: a living light wallFour scenes from the course on one panel, a plankton bloom, drift, a noise tide and a fish school, played from a playlist you can rearrange and extend. | 50 min |
|
Materials
- Addressable RGB LEDs
- ESP32-C3-DevKitM-1
- Full-size breadboard
Check for understanding
Each student finishes "Project: a living light wall" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Add your own scene".
Teach this unit as a class
Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.