Image:
 Author: Xray Group: Default Filesize: 133.65 kB Date added: 2013-05-04 Rating: 7.3 Downloads: 2906 Views: 860 Comments: 11 Ratings: 7 Times favored: 0 Made with: Algodoo v2.1.0 Tags: cube, Rubik
|
There is no simple way to display and rotate a 3D cube in a 2D physics program such as Algodoo. So, some clever people (not me) have devised a method of displaying a 2D version of a Rubik's Cube. My scene shows two methods of displaying the cube. The one on the left is a partial 3D cube, with simulated mirrors that reflect the three sides that normally would be hidden. The cube on the right, simulates a cube that has been peeled apart and all six sides have been laid flat. Both versions are updated with accurate colors as the various sides are rotated by the user.
I used standard Rubik's Cube notations for orienting the cube (Up, Down, Left, Right, Front, and Back). The rotation directions are when the side to be rotated is facing the player. For example, if you want to rotate the Back side, you would face the (white) backside toward your eyes, and rotate it either clockwise or counter-clockwise. Each rotation is 90 degrees. If you want to rotate a side 180 degrees, then you obviously must do two rotations in the same direction.
There are some on-line Rubik's Cubes that have "Scramble" and "Reset" buttons, but I elected not to add them at this time. If there seems to be a lot of interest in this scene, then I might add those buttons later. For now, you can scramble the cube by randomly clicking on the buttons. After 15 to 20 rotations, the cube should be sufficiently scrambled. You can do a "Reset" by simply restarting the game to its initial condition.
Please comment and tell me if you like it, and if you would like to see any changes and improvements.
Thanks! |