Home
   Projects
   Ideas
      Magic Cube
      Manga
      KeyCalc
   Personal
   Donation
   Contact
   Links
Home » Ideas » Magic Cube »

Magic cube

Download
Zipped GLCube setup
v.1.1.516

88519 bytes

Introduction

This program is free software provided on "AS IS" basis, details see below in the License section.

This program simulates famous magic cube. It does not have a module to solve given combination yet. It is just a model. It allows you practice solving the cube even if you have no physical cube. It has one very important feature: you may start from the beginning at any time.

Magic cube in window

Command Line Parameters

The program supports only two switches at this time:

  • app to run in application mode
  • saver to run program in pseudo screen saver mode (IT IS NOT TRULY SAVER)

Controls

When running in application mode program supports these controls:

Right mouse button to rotate cube
Left mouse button to rotate layers of cube (drag and drop)
Arrows, PgUp-Home rotate cube
Pad 5, Shift-Pad 5 distance to cube
PgDn, End rotation delay in ms
Backspace undo one last step
Shift-backspace undo till the beginning
Gray+, Gray- amount of particles in cube
F2 shuffle
F4 fullscreen
F5 axises on/off
Ins-Del choose figure to make
Enter perform selected figure
Esc exit from program
S save current colorisation
L load saved colorisation

If you using S and L commands history usage is not recommended.

When getting cube in the center it rotates cube like trackball. When getting cube somewhere 75% off the center of the screen it makes cylyndrical rotation.

File glcu.cmb

This file contains combinations and loaded by program at start. This file contains various figures. The string started with # ignored. Empty strings are also ignored.

The format of file is very simple:

figure-name:commands-list

The command-list represents a list of standard magic cube commands. They can be separated with spaces or follow immidiatly one after another. One magic cube command consists of the following items:

[C|O]<command>['][1|2|3]

where

Cmeans "central" layer while looking from side of clockwise
Omeans whole cube while looking from side of clockwise
'means counterclockwise
1means one quarter
2means two quarters
3means three quarters
<command>-s are:
Ffor Front side
Bfor Back side
Lfor Left side
Rfor Right side
Ufor Upper side
Dfor Down side

You may also agregate commands in blocks using () or [] or {}, but not <>. Of course close brace type must correspond to the open one:

(cmd1 cmd2 cmd3 cmd4 ... )NN

The number NN represents number to repeat commands in braces. Agregations may be nested unlimited number of times, but the number of basic commands after agregation is expanded must not exceed 2048.

Samples:

  • Rotate front clockwise 90 degrees: F1
  • Rotate back 180 degrees (clockwise, but this meaningless for 180): B2
  • Rotate left counterclockwise 90 degrees: L'
  • Rotate central layer between left and right (CW from left side): CL
  • Rotate central layer between upper and down (CCW from upper side): CU'
  • Rotate whole cube clockwise from front view: OF
  • Do complex command in braces twice: (R' D F' D2 F D' R U2)2
  • Or do complex command in braces twice: {R' D F' D2 F D' R U2}2
  • Or do complex command in braces twice: [R' D F' D2 F D' R U2]2
  • Nested braces: [(CF2 D CF2 U2 CR2 U' CR2 U2) OF']2 OF2 {CR' CD' CR CD}
  • Or nested braces: ((CF2DCF2U2CR2U'CR2U2) OF')2 OF2 {CR' CD' CR CD}
  • BUT NOT DIFFERENT! braces: [R' D F' D2 F D' R U2)2

License

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.


Last modified: 22:53 06.09.2014
Copyright © design, development, coding & content 2004 Boris L. Zanin
http://bzanin.tk/ | http://jump.to/bzanin | http://here.is/bzanin