Rubik's cube, illuminated

python making electronics nablopomo ledpanel cube

One face of a Rubik's cube, drawn by a script. All the six different colours are visible.

For some reason, many years ago, I bought a few 32x32 LED panels - a bit like these, only much cheaper (I suspect they were being sold off as end-of-stock or similar).

I've since been thinking up ideas for what to do with them. If you're a close observer of my Mastodon feed you may have noticed one panel being put to effect at Hallowe'en - there was quite a lot of work involved in that, which I may blog about later - and though it was a lot of fun, it only used one of the panels.

But I have three such panels... so what to do with them?

It's not really enough to make a big display (well, I suppose you could make a 1x3 display, or 3x1, but that seems too elongated to be useful). But... three panels could make the three visible sides of a cube, which (somewhat inspired by Lex's giant cube that they took to EMFCamp) suggests making a large, illuminated Rubik's cube.

To see how viable this might be, I've thrown together a quick Python script that uses PyCairo to draw a face of a cube, and animate it rotating.

Cube face, rotating continuously as if someone is turning the visible face round and round

Will this look good illuminated? At some point I'll try showing it on one of the LED panels to find out... for the moment you'll have to use your imagination, but I suspect it will work well enough.

The more taxing question is: how would one control the cube, to move the layers around in order to solve it?

In the mean time, the next step is to produce the other animation, for what happens if someone rotates a slice that is side-on to the viewer.

0 comments

Post a comment

All comments are moderated, and will not show up immediately on the site, or at all – and if they do, their content may be edited.