4 ms·
Fun article! Makes me want to play with prolog again. I put together something looking at a rubik's cube as a permutation of numbers a while back. https://ta
by taeric 9mo ago
Fun article! Makes me want to play with prolog again.
I put together something looking at a rubik's cube as a permutation of numbers a while back. https://taeric.github.io/cube-permutations-1.html https://taeric.github.io/cube-permutations-1.html I remember realizing that my representation essentially had some permutations of numbers that it would never hit, but wasn't sure it was worth trying to more directly model the pieces of the cube. Curious if there are advantages here that I'm ignoring.
- QuadmasterXLII 9mo agoone 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/ https://www.hgreer.com/TwistyPuzzle/
- taeric 9mo agoNice! 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.