Solve Rubik's Cube (solution guide inside)

Topic:
Cube, Logic
Use Google Chrome to load this worksheet. If doesn't load, download the .ggb file. In fact, I recommend you to download it as it works much faster than the worksheet.
How to: When you first open the worksheet you will see nine colored buttons you can use to rotate the cube´s faces/layers 1/4 turn. The buttons' colors match with the color of the axes. For instance, X1+ button is red and that's why it rotates one of the faces (the one on the left) around the red-colored x-axis. The numbers 1, 2 and 3 of the buttons increase in the positive direction of the axis. E.g., Z1+ rotates the lower face, Z2+ rotates the horizontal layer in the middle and Z3+ button rotates the upper one. If you switch +/- slider, you will see nine new buttons that work as explained above but the difference is that they rotate faces/layers of the cube in the opposite direction. In other words, it switches clockwise turning into counter clockwise turning and viceversa. Notice that when switching it the turning arrows change as well. Give it a try by pressing different buttons and see how the cube changes. You will understand immediately how each button works. Moreover, there is a boolean value pick called 'select colors' that allows you to paint the cube as you wish. If you use this feature, be careful and try not to set an unsolvable pattern. I only recommend you using it if you want to copy a Rubik's cube you own (a physical one). If you want to solve any cube, just use 'scramble' button. What it does, basically, is to move sixteen faces/layers of the cube by random. This method ensures that the pattern obtained is solvable (as long as you scramble a solvable one). To solve the cube you can either use the eighteen colored-buttons (the ones I speaked of before) or set to true the boolean value pick called 'solve the cube by using the solution guide'. This will show you twelve new pictured-buttons that are related with the movements the guide on the right window says. Before you use them, make sure that you orient the cube as the guide tells you to. For instance, in some parts of the guide you have 'hold' the cube so that the pieces you want to swap are in the right face. In order to do that don't rotate the 3D graphics view. Instead, use buttons 'rotate cube clockwise', 'rotate cube counter clockwise' and 'turn over' in order to match the orientation of the pieces with the labels U,D,L,R,F and B around the cube in the 3D graphics view, As you may figured out in these labels U stands for Up, D stands for Down, L stands for Left, R stands for Right, F stands for Front and B stands for Back. You can, of course, rotate the 3D graphics view to examine your cube but look at the labels to figure out which face is each one. If you want to go back just press 'undo' button on the upper right corner. By the way, the method the guide explains is the one that beginners use. All the credits for this tutorial go to Rubik's Brand LTD. Ýou can find it at www.youcansolvethecube.com. About this applet: This applet is beta tested. I have already solved many cubes. When I first made this applet I wrote all the code in my mother tongue (Basque) and the .ggb file did well but the worksheet didn't work as it didn't recognize words like 'urdina' (blue in Basque). I had to change the language of the applet and rewrite some parts of the scripting in order to translate it into English and make the worksheet work. By the way, I also translated the names of the buttons, the explanations, many variables, etc. I almost translated everything not only to share it with the non Basque speaking community but also to make more easy to understand how it works, in case someone looks at the code. If you download the construction, you may see there is a boolean value pick always hidden called 'spin'. It shows/hides eighteen buttons that make the layers of the cube rotate as an animation. In the earlier stages of this applet it used to work but at some point it got buggy. Well, actually, I'm not sure what the problem is. Maybe my old computer is not powerful enough to move 3D animations while saves all the changes. Maybe the problem has something to do with GeoGebra/Java compatibility. Maybe it is a bug of the program that will be fixed in future releases (after all, GeoGebra 5.0 was released not so long ago)...I don't think the problem is in the scripts and/or the variables because, as I said before, it used to work. I didn't delete it (it's hidden) because I hope, whatever the problem is, it will be solved in the future. I'd like to see this applet with a nice and smooth animation. I have literally made +150 GeoGebra applets in last three years and this is by far the one that took me more time to complete. If you liked it and/or had some fun solving Rubik's cubes with it (as am I after +15 years since I solved the last one), please, give me a 'like'. It will encourage me to do/share more applets in the future.