Matt Parker Turns a Christmas Tree Into a 3D-Mapped Volumetric Display Using 500 RGB LEDs

Using 500 RGB LEDs, Parker's Christmas tree doubles as a 3D-mapped display for arbitrary colors and patterns — albeit at a low resolution.

With only 354 days until Christmas 2021, it's by no means too early to start planning decorations — and those looking for inspiration should look at Matt Parker's impressive Raspberry Pi 3-powered tree lights, which are mapped as a 3D volumetric display with single-pixel precision.

Blinking lights are the common thread between engineers experimenting with new technology platforms and those looking to celebrate the holidays - and Parker's project combines the two. Taking a Raspberry Pi 3 and addressable WS2811 RGB LEDs, Parker created a lighting system which turns his tree into a 3D display — by mapping every one of the 500 individual LEDs and controlling them via a Python script.

Some clever mapping, a smidgen of Python, and 500 LEDs turn a tree into a 3D display. (📹: Stand-up Maths)

The project started small, with a proof-of-concept implementation on a Raspberry Pi Zero using WS8201 LEDs. Following a popular tutorial, Parker was able to connect the LEDs to the Raspberry Pi and control them programmatically - and once the concept was proven, it was scaled up. "I switched the WS2811 LEDs because I could buy 500 of them," Parker explains. "They are also cheaper. I also switched to a Raspberry Pi 3 because my Pi Zero didn't have Wi-Fi."

Following Adafruit's NeoPixel wiring guide, Parker hooked all 500 LEDs to power and the Raspberry Pi then decorated a tree before calculating the position of each individual LED using a 3D coordinate system. "Apparently there is an off-the-shelf version of this," Parker notes, "but I console myself that it seems to only map the 2D surface of the tree. So at least my effort got me a third dimension! Albeit a low-res one."

The lights are controlled using a Python script, published to GitHub under the permissive MIT License along with a coordinate file applicable only to Parker's own tree. For those looking to experiment without physically building the project, a simulation is available on GeoGebra.

The full video, and links to the parts used, can be found on the Stand-up Maths YouTube channel.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Related articles
Sponsored articles
Related articles