Rubik's cube: slide the side, take 2

python maths making cube electronics nablopomo ledpanel

A still frame of the animation: the right-hand edge of the cube is part way being rotated towards the user. The coloured squares that are rotating into view are smaller vertically, because of the angle at which they are to the user.

I previously posted about a prototype animation I'd done for a potential large, illuminated Rubik's cube project.

That animation moved the side as if there were a ribbon wrapped all around the cube (well, that slide of it), with the colours painted on it: as the ribbon slides round the cube, the "old" colours disappear and the "new" ones appear, but they all stay the same size. Can we make it more realistic?

With a bit of trigonometry, we can arrange for the heights and positions to change as if the colours were truly around the edge of a square piece that's being rotated towards us. With even more hacky Python, it looks like this:

Cube of which the right hand edge is repeatedly rotated 90 degrees towards and away from the viewer

I think it looks better, though it remains to be seen how it will look on one of the LED panels. Which one do you prefer?

Animation from previous rotating cube post Same animation as above, for comparison

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.