A quick hack of a page to show "cube" and it's ability.

First thing's first - the code is at the project summary page. You will need XParam compiled and to modify the Makefile a bit to get it compiled. You will probably also need to delete moc_panel.cc. Don't worry - if QT dev is installed, the file will be created by the makefile. Current CVS already fixes the last problem.

We would also like to extend thanks to SourceForge.net Logo for hosting this project.

Here are a few screenshots:

The program with ordered tesseract.

As above, after having made two of the three clicks required to make a move.

The above move completed. We can see that a plane of red stickers (balls) is now distributed among the middle panes, while four lines of blue stickers, that were before distributed, are now merged into one plane of blue stickers on the left pane.

The exact same setup, after having rotated the tesseract a bit with the mouse.

Follows the text of the help message, as appears inside the program:


The Cube User's Guide


  1. What is Cube?
  2. Basic Keys and Controls
  3. Playing the Game
  4. Available Options
  5. Advanced Features

What is Cube?


Cube is a program designed to simulate a Rubik's tesseract (a four-dimensional hypercube). Specifically, the tesseract provided is a 44 hypercube, that is, a hypercube whose dimensions are 4 by 4 by 4 by 4.

The tesseract follows all the regular laws of a Rubik's cube, only in four dimensions. What this means is that at each step you can alter the hypercube by revolving one of its three dimensional sections.

You choose which section to revolve, and in which direction to revolve it, but be aware that there are many more legal moves in this four-dimensional cube than there are in the regular Rubik's cubes.


As in the ordinary game, the objective is to re-order the cube by using the legal moves, after it is mixed. The cube is considered ordered if each pane is of uniform color. Keep in mind, however, that a four-dimensional cube has eight panes, each of which is a cube. In this particular case, because the tesseract is a 4*4*4*4 piece, each pane has 4*4*4, or 64, different 'stickers', and they should all be of the same color.

For visual clarity, the stickers were chosen to be ball-shaped.

Basic Keys and Controls

Viewing the Cube

Use the keyboard to look at the tesseract from different angles: The keys A, D, W, S, F, H, T, G, J, L, I and K rotate the cube 90O in the various directions available in four dimensions.

You can also use the right mouse button to click and drag any of the balls representing the colored stickers on the hypercube. This will make the cube change its 3-D orientation, and will allow you to look at it at an angle, instead of head on. Sometimes this can be beneficial. However, at other times you may find that you want to look at the cube the ordinary way. Simply click 'Reset View' to bring the cube back to its original orientation.

Moving the Cube

The left mouse button is used to actuate all the different moves of the cube. This is done using a three-click combination:

Playing the Game

The Basic Controls

When you start the program, the cube is in its ordered position, and you are not in game mode. You can return to this state at any time by pressing the Reset button. If you press this during a game, the game will be aborted.

A game can be started by pressing Mix. This will cause the cube to mix itself to an arbitrary start position, from which you can start working your way back. A counter on the top-left side of the screen will count the number of moves you will require for this.

If you wish to quit the program at any time, press Quit


Note that for most of the functionality of the program there are useful shortcuts: Alt-key and Ctrl-key combinations, as well as menus.

Available Options

The Options Menu

Under the Game menu, you will find the Options dialog. This dialog enables controlling both the Display Style and the Animation Mode.

Display Style

Display Style refers to one of two ways in which the hypercube can present itself on the graphic screen. One is projection of the fourth dimension into lower dimensions (here, directly to two dimensions). The other is section which means viewing by taking three dimensional slices of the cube and displaying them.

By default, the Display Style is set to section.

Note that the difference between the two display styles is only appearent when the cube is moving. When the cube is motionless, both display styles will lead to the same result.

Animation Mode

Animation Mode refers to the level of detail you want to see when the cube moves. This can be set to one of three different levels:

Commandline Options

Cube uses an XParam-generated command-line. If you invoke the program using an exclamation mark as a parameter:

~>./cube !

you will get a complete listing of command-line options.

On the command-line, Cube lets you control the initial state of both the Display Style and the Animation Mode, and also gives you control over the choice of icon to be used by the program

Cube comes with two options for an icon ('cube' and 'cube2'), but it can also handle any other bitmap file.

Advanced Features

Undo and Redo

Cube provides Undo and Redo buttons for your convenience. Note that if you are using move sequences, undo and redo will be done for an entire sequence at a time.

There is no limit to the undo capability of Cube.

Using the Command Prompt

One of the most powerful features of Cube is its command prompt, available on the bottom of its main window.

The command prompt, utilizing XParam technology, can be used to specify move instructions to the tesseract.

A simple move is specified as follows:


That is, a move requires three position parameters. These are used in exactly the same way as the sticker selection is used to specify a move in the mouse interface. The positions themselves are four-dimensional, hence the four integer parameters.

You can specify as many moves as you like on the command-line, by separating them with space characters:

move(...) move(...) move(...)

or you can join them together, to form a single move sequnce:

[move(...), move(...), move(...)]

When undoing and redoing, move sequences are treated as a single bulk. They can also be transferred that way and manipulated. Here, are two examples:

inverse(move(...)) inverse([move(...), move(...), move(...)])

The main strength of the command prompt lies in its extendability. Try, for example, writing demo() on the command prompt. You can extend Cube in the same way. Consult the XParam User's manual for details how.

Note that the move macros receive the current state of the cube they operate on. By using the color() method of cube, it is possible to program your macros to be as smart as you want them to be.


To quicken your ability to use the command prompt, a toggle button labeled Record is available for you. When the button is down, any move you specify using the mouse will be recorded in the prompt.

The Middle Mouse Button

Similar to the Record, the middle mouse button provides a quick and easy way to specify the positions of the stickers you see.

Simply press the middle mouse button when over a sticker, and the position of that sticker will be appended to your command prompt.

Good Luck!