davidwhogg/MagicCube — pull request #2 by jakevdp (2012-11-26 03:56:51+00:00)
Title: (almost) Fully functioning animated cube

Here's my progress for today: I'm pretty excited by it!

Run ``code/cube_interactive.py`` to see the cube in action. Faces can be turned using the UDLRFB keys, holding shift for counter-clockwise. The solve button doesn't do anything sophisticated: it simply undoes the current list of moves.

One limitation currently is that non-outer faces can't be turned from within the GUI. They can be turned in the code, though: I'm not sure the best way to access that, aside from a more complicated click-and-drag interaction (which I hope to add soon).

Another strange feature currently is that the cube is just a shell, so you can see through the inner faces when they're half-turned.

All-in-all, I'm pretty happy with this, and impressed that matplotlib can do this in just a few hundred lines of code!