News for hackers. Stuff that matters.
Re:Rubik's Cube in Prolog – Order by QuadmasterXLII on Wednesday January 14, 2026 @08:28PM (#46626702)
one nice thing is that if you represent the state as a permutation matrix P, and have a matrix of starting piece locations x, rendering is just Px. Then, for smooth rotation animations, if your move is a permutation M, animation is just expm ( t logm( M)) P x with t going from 0 to 1

I blather about the permutation matrix of a rubiks cube for a long while at https://www.hgreer.com/TwistyPuzzle/

Re:Rubik's Cube in Prolog – Order by taeric on Thursday January 15, 2026 @09:43AM (#46633197)
Nice! I have a css based animation at the bottom of the page I was playing with. Considered trying to do it with 3d animations, but at that point I was assuming something like the main article here would be needed to keep the faces coherent to each other.

I also never kept going down this route to actually learn solutions. Which, I think should be easy enough to do.