You are here: Home Resources Maple Maplet Rubik's Cube

Maplet Rubik's Cube

by Andy Revenko last modified Dec 08, 2009 02:30 PM

I love Maple. And hate it.

 

Maplet CubicRubik

First of all, I don't like classical programming (C#, Delphi etc), it bores me to death. Maple greatly helps me in my activity as teacher (physics, informatics and mathematics) and in my scientific work (simulation of atoms interaction in semiconductors). So, I've just tried to make a small and simple game based on Maple.

  • Remark 1. Of course, Maple is to be installed to launch Cubic-Rubik Game
  • Remark 2. Since Maple is not a classics development environment (and, may be due to lack of my knowledge in Maple), my Cubic-Rubik Maplets cant work so quickly as typical 3D Games, it might take a time for preparing of animation

I have developed it in Maple 11, it also works under Maple 10 but sometimes curiously. In any case a powerful computer is recommended (I am using Core 2 Duo (T5200), and it work normally)

 

To run Cubic-Rubik Maplets
  • Download (from here) the file CubicRubik. Place CubicRubik.mla file in subdirectory Lib of directory where Your Maple is installed. For example, in my PC the CubicRubik.mla file is located in the follow path "C:\Program Files\Maple 10\LIB\CubicRubik.mla"
  • Start Maple, create new worksheet (or use any opened worksheets)and write the following code:
> with(CubicRubikPackage): ShowCubicRubik();

 

After this, You would obtain following Maplets-Window:

Window of Cubic-Rubik game
Main window of CubicRubik Maplet

 

 

1. Scheme of planes and axes enumeration

  Fig. 1 Axes orientation of Cubic- Rubik
 
  Fig. 2 Enumeration of planes of Axis number one
Button corresponds to the rotation in direction of curved arrow (clockwise)
Button corresponds to the counter-clockwise direction of rotation 
  Fig. 3 Enumeration of planes of Axis number two
Button corresponds to the rotation in direction of curved arrow (clockwise)
Button corresponds to the counter-clockwise direction of rotation  
  Fig. 4 Enumeration of planes of Axis number three 
Button corresponds to the rotation in direction of curved arrow (clockwise)
Button corresponds to the counter-clockwise direction of rotation 

 

 

2. How to play

2.1 Selecting the axis  

 
button choose axesClick button Choose for selecting an axis, number of chosen axis is shown in correspond text field (readonly field). Axes are selecting in following order:1, 2, 3, 1, 2, 3  and so on

 

2.2 Selecting the plane  

 

 

button select planeClick button Choose for selecting an plane (of selected axis), number of chosen plane is shown in correspond text field (read-only field). Planes are selecting in following order: 1, 2, 3, 1, 2, 3 and so on.  


2.3 Selecting the direction of rotation   
button rotation directionClick button for rotation of the selected plane in clockwise direction (if look on the top of the selected axis), the direction are shown on the pictures by curved-arrow.Button corresponds to the opposite direction of rotation  

 

 

3. Games options

3.1 Random disordering of Cubic-Rubik    
button random disorderingFor random disordering of Cubic-Rubik input the integer value in correspond text field. The value indicates how many casual single rotation of the selected plane (on the angle of 90 degrees) will be applied on the ordered Cubic-Rubik. Be careful, if the input value are too high, it will take a time for displaying the result. If use a value “0”, the ordering Cubic-Rubik will be displayed  

3.2 Axes presentation  

 

option axes presentationBy default there are show no axes. Selecting the correspondently checkboxes will show axes of Cubic Rubik in two manner detailed(axes with directions of possible rotation) and simple (just axes will be shown) 

 

4. Menu

4.1 File -> Save  Saves the current position of Cubic-Rubik. The name of the saved files is constructing in follow manner: Current Date + Current Time+ cr extension, saved file are placing in directory, that indicating by the curretdir() function. Example of full name of saved files: "c:\Maple\work\2008-02-16 20-50-00.cr"  
4.2 File -> Load   Load the saved position of Cubic-Rubik  

 

 

5. Troubles

5.1 Orientation   Until now I don't know how to get (programicaly) a current values of Theta and Phi angles -  values of orientation option in display. So, every rotation are discarded by any mouse-made changing in space orientation of the Cubic-Rubik.
5.2 Embedding   Until now I don't know how to get (programically) image (array of bytes) of the embedding image. If I knew it, I would make a help embedding in the Cubic-Rubik package.
I SHALL BE GRATEFUL FOR ANY HELP IN THIS MATTER  

 

 

I shall be very grateful for any remark about this Maplet, my e-mail:  

andy_revenko@yahoo.com

andy.revenko@gmail.com

 

Yours,

Andrey Revenko


 

Document Actions
« May 2024 »
May
MoTuWeThFrSaSu
12345
6789101112
13141516171819
20212223242526
2728293031