Category: p5js

Creative coding experiments made with p5.js, exploring generative art, interaction, randomness, movement and data through code. A collection of browser-based sketches where design, creativity and programming meet.

  • Solar Eclipse 12/8/2026: A Dot-Matrix Sky

    Solar Eclipse 12/8/2026: A Dot-Matrix Sky

    There’s something wonderfully low-tech about watching a solar eclipse through a cardboard box.

    I remember being at school in the 80s and 90s and making simple pinhole viewers — cardboard boxes, a tiny hole and an image of the Sun projected safely onto the inside. No screens, no apps, no live streams. Just a little glowing circle of light and the slightly strange feeling that something unusual was happening above us.

    With another solar eclipse arriving on Wednesday 12 August 2026, I wanted to revisit that memory, but through generative art.


    Watch my live simulation here


    A digital pinhole viewer

    The idea for this project is deliberately simple.

    The entire sky is constructed from a grid of tiny dots. In the centre, brighter yellow and white dots form the Sun, while shades of sky blue create the surrounding atmosphere.

    Rather than drawing recognisable clouds, slowly moving noise passes through the grid. It creates subtle areas of light and shade that drift across the image — more like changing atmospheric conditions than illustrated clouds.

    The dot-matrix appearance is a little nod back to available technology back then. The image isn’t trying to reproduce the sky perfectly. It’s reducing it to light, dark and a grid of tiny marks.



    Following the real eclipse

    The project has two modes.

    Simulate compresses the entire eclipse into a short animation, allowing me to experiment with the effect at any time.

    Live is the more interesting one.

    On 12 August, the artwork follows the actual time of day and the progression of the eclipse. The sky begins as a light blue around #87CEEB, gradually changes with the natural daylight, and becomes darker as more of the Sun is obscured.

    As the Moon moves across the Sun, its dots are progressively swallowed by the darker grid. The surrounding sky responds at the same time, before gradually becoming lighter again as the Moon moves away.

    Because the eclipse is happening towards the evening, the natural transition towards sunset is happening at the same time. The two systems overlap: the real day is getting darker while the eclipse temporarily makes it darker still.


    Taking the cardboard version with us

    The digital version won’t be our only viewer.

    We’ll be heading to Moor Park in Preston with our pinhole box viewers to watch the real thing.

    A free community viewing event starts at 5.45pm, with astronomers from the University of Lancashire and Preston and District Astronomical Society bringing specialist equipment and eclipse glasses so people can observe it safely.

    It’s being billed as the UK’s deepest solar eclipse in over a decade, with the Moon covering up to 96% of the Sun in parts of the UK.

    So while there will be plenty of sophisticated astronomical equipment pointing towards the sky, I quite like the idea that we’ll also be standing there with a cardboard box.

    Some technology is difficult to improve upon.

    And somewhere nearby, my devices will be doing essentially the same thing — turning the Sun into a collection of little dots and watching them disappear.

    Watch my live simulation here

  • Experiments: What if every line had a memory?

    Experiments: What if every line had a memory?

    What if every line could remember the moment it was created?

    This project explores that thought by treating every line as its own little life. Each one is born with a timestamp, a unique set of characteristics and its own colourful identity. Some grow quickly, some take their time. Some live long lives, while others disappear much sooner.

    As each line ages, it slowly grows, changing direction as it travels. Every twist and turn becomes part of its story. Although the movement appears random, each line is confined to its own invisible space, giving every life a set of boundaries it can never leave.

    When a line reaches the end of its lifespan, it doesn’t simply vanish. It fades to a soft grey and remains on the canvas as a memory of where it has been, while a new generation begins its own journey.

    Watching the artwork over time reveals hundreds of small, individual stories unfolding at once. Some areas become dense with memories, while others remain surprisingly sparse. No two runs are ever the same.

    Like many of my projects, this started with a simple question. It isn’t trying to represent anything literally; it’s more about exploring how a few straightforward rules can create something that feels surprisingly human.

  • Exploring p5.js

    Exploring p5.js

    Most of my recent generative art projects have been built with Processing and Java. It’s a workflow I’ve really enjoyed because it keeps the focus on the code and the creative process.

    Lately, I’ve started exploring p5.js. It takes many of the ideas from Processing and brings them into the browser using JavaScript, making it easy to create interactive sketches that anyone can experience without installing anything.

    One of the main reasons I’m experimenting with p5.js is to make this blog more interactive and visual. Instead of only sharing finished images, I’ll be able to embed live sketches that visitors can explore and interact with directly on the page.

    I’m not moving away from Processing—far from it. Processing will remain my main tool for creating high-resolution prints and posters, while p5.js opens up new possibilities for interactive experiences on the web.

    It’s another creative tool to add to the collection, and I’m excited to see how it shapes future projects.