A JavaScript library for creative coding, with a free browser editor. Students write short programs that draw, animate and respond to input.

Creative Replace

Grade 7 robot character drawn from p5.js shape commands on a 400 by 400 canvas

Grade 7 (Year 8, age 12 to 13) · 50 min · 1 device per student

Creative Replace

Students plan a robot on the squared page of their book, then write p5.js commands such as rect(), ellipse() and fill() to draw it at the coordinates they planned.

Read the lesson and why it sits here →

Creative Transform

p5.js artwork driven by the live local weather, shown in the art corridor

Grade 9 (Year 10, age 14 to 15) · 240 min · 1 device per student

Creative Transform

Students write a p5.js sketch whose colours, movement and density are set by live weather readings, then leave it running on a screen for a week.

Read the lesson and why it sits here →

Grade 11 textile print generated from Met Office rainfall records since 1836

Grade 11 (Year 12, age 16 to 17) · 300 min · 1 device per student

Creative Transform

Students take the Met Office monthly rainfall series for their region since 1836, write p5.js rules that turn every month into a mark, and print the generated design onto fabric.

Read the lesson and why it sits here →

Generative artwork that changes with each spectator's movement and voice

Grade 12 (Year 13, age 17 to 18) · 300 min · 1 laptop per student with webcam and microphone

Creative Transform

Students code a p5.js piece that reads how much a spectator moves and how loudly they speak, so every visitor changes the work, with no images or sound stored.

Read the lesson and why it sits here →

Times-table circle patterns coded in p5.js, from cardioid to nephroid

Grade 9 (Year 10, age 14 to 15) · 100 min · 1 device per student

Creative Transform

Starting from a p5.js starter sketch, students code the times-table circle, where point n joins point k × n mod N, and investigate which multipliers make which curves.

Read the lesson and why it sits here →

Foyer sound installation in p5.js that answers the room's noise level

Grade 12 (Year 13, age 17 to 18) · 240 min · 1 laptop per student with microphone and headphones

Creative Transform

Students code a p5.js sound installation for the school foyer that listens to the room's noise level and the time of day, and changes its texture, harmony and density in response.

Read the lesson and why it sits here →

This page is one of a growing set of PICRAT examples by cell, subject and grade. Page maintained by Andy Perryer.