Coding activity
Algorithm Art
Follow step-by-step drawing instructions to create a picture. The instructions are your algorithm! Each step adds one shape or line.
Materials and setup
- paper
- crayons or markers
- pencil
How this changes by age
Pre-K (ages 3–4)
Follow step-by-step drawing instructions to create a picture. The instructions are your algorithm! Each step adds one shape or line.
Steps
- Parent gives one drawing instruction at a time: 'Step 1: Draw a big circle in the middle.'
- Child follows each step: 'Step 2: Draw two small circles inside for eyes.'
- Continue step by step until a picture emerges (a face, an animal, a house).
- Child colors in the finished drawing.
- Compare: did everyone's picture look the same? The same algorithm can give different results!
- Tell a grown-up one thing that surprised you.
Learning objectives
- Follow sequential visual instructions to create a drawing
- Understand that step order matters in producing a result
- Experience how algorithms produce predictable outcomes
Kindergarten (ages 5–6)
Write your own drawing algorithm! Create step-by-step instructions that someone else can follow to draw the same picture without seeing yours.
Steps
- Draw a simple picture (a robot, a house, a flower) in secret.
- Write step-by-step instructions for how to draw it (5-8 steps).
- Give only the instructions (not the picture!) to a family member.
- Watch them draw using your algorithm. Does their picture match yours?
- Discuss: what instructions were unclear? Revise your algorithm and try again.
- Tell a grown-up one thing that surprised you.
Learning objectives
- Write clear, unambiguous instructions for a visual task
- Test an algorithm by having another person execute it
- Iterate and improve instructions based on test results
Early elementary (ages 6–8)
Create algorithmic art using mathematical rules: draw patterns using loops, create pixel art on grid paper with coordinate instructions, and generate geometric designs with rotation and repetition rules.
Steps
- Pixel Art Challenge: on graph paper, number the columns (1-20) and rows (A-T). Write coordinate instructions to draw a picture: 'Color B3 red, B4 red, B5 red, C2 red...' Give only the instructions to someone else and see if they reproduce your image.
- Loop Art: create a design rule like 'Draw a square. Rotate 10 degrees. Repeat 36 times.' Use a protractor to execute this algorithm on paper. See the spirograph-like pattern that emerges.
- Growing Pattern Art: draw a shape, then draw it again 20% larger around it, then 20% larger again. Repeat 5 times. Color each layer a different shade.
- Random Art: number 6 actions (1=red line, 2=blue circle, 3=green square, 4=yellow triangle, 5=purple dot, 6=orange spiral). Roll a die 20 times and execute each action in a random position on the paper.
- Compare all 4 artworks: which algorithms create predictable results? Which create surprising results? Why?
- In one sentence, tell a parent or sibling what surprised you today.
Learning objectives
- Apply coordinate systems to create and communicate visual designs precisely
- Use mathematical operations (rotation, scaling, repetition) as generative art algorithms
- Compare deterministic algorithms (predictable output) with random/probabilistic ones
Upper elementary (ages 8–10)
Study generative art and create your own algorithmic art pieces using rules, randomness, and recursion. Write the algorithm clearly, execute it by hand, and compare how small rule changes create very different results.
Steps
- Research generative art: art created by algorithms. Look at works by Vera Molnar, Sol LeWitt, and Casey Reas. Note how simple rules create complex visual results.
- Create Algorithm 1 — Recursive Trees: Draw a line (the trunk). At the top, split into 2 lines at angles, each 70% as long. Repeat for each new line until lines are less than 1cm. Change the angle and see how the tree changes.
- Create Algorithm 2 — Tile Patterns: Divide a square into a 5x5 grid. For each cell, flip a coin: heads = draw a diagonal from top-left to bottom-right, tails = top-right to bottom-left. See the maze-like pattern that emerges.
- Create Algorithm 3 — Color Field: divide a paper into 100 squares. Roll a die for each: 1-2=light color, 3-4=medium color, 5-6=dark color. Fill each square according to the roll.
- For each algorithm, make the piece, then change one parameter (angle, probability, number of colors) and make it again. Put the versions side by side.
- Write a short creator note explaining generative art, how algorithms create visual complexity, and what you learned about the relationship between rules and results.
Learning objectives
- Research and understand generative art as a discipline combining programming and visual design
- Apply recursive algorithms, probability, and parameter variation to create visual art
- Analyze how algorithmic parameters affect output and articulate findings in a creator note
Safety and evidence note
Read the full activity before beginning. An adult should supervise tools, heat, food, outdoor work, movement, and experiments as appropriate. Completion records that the activity was done; the child’s explanation, work sample, photo, or demonstration is stronger evidence of learning than a completion check alone.
Related coding activities
AI Explorers
Train a pretend 'robot brain'! Show it 5 cat pictures and 5 dog pictures, then test if it can guess a new one.
API Restaurant
Play restaurant! The customer tells the waiter what they want, the waiter tells the kitchen, and the kitchen makes it. The waiter is the messenger — just like how computers talk to each other!
App Design Workshop
Design your dream app! Draw what you'd see on a phone screen. What would your app do? What buttons would it have?
Automation Station
Act out your morning routine — wake up, brush teeth, get dressed, eat — and notice how you do the same steps EVERY day. That's a loop, just like computers use!