Home Page
Projects > Rubix
Rubix Thumbnail
Rubix v1.0
Virtual Rubiks Cube with Solver
Rating: 10 (Fun little application that surpassed its original goals)
Project Time: May 2003-6/30/2003: 35
Languages: C, Direct3D
Requirements: DirectX
Downloads: Binary (See any updates below for prior versions)
Sections: Information, Content, Concepts, Notes, Updates, Comments
Virtual cube with multiple face and cube view rotation methods, find solution (in under 20 moves), input custom cube state, remap face colors, save/open cube states, view from multiple angles, solution tutorial, and timer
Original Readme File: (slightly modified)
  • Windows 98,ME,2K,XP
  • Direct X 9.0+
  • 64+ MB ram
  • 3D Accelerated Graphics Card (Or it will be rather slow)

  • To rotate the cube, right click in the main window and move the cursor, and the cube drags along with it.
  • To rotate a part of the cube, select a face on a side by left clicking and rotate it in the direction you want it to move. It will lock into moving that direction until you let go of it.

Menu Options:
  • File
    • Open/Save Cube
      • The Open/Save Cube functions save the custom colors and position of cubes into an .rbx file.
    • Exit
      • ...
  • Options
    • Reset
      • Resets the cube to its initial state
    • Mix
      • Mixes a cube up using valid moves, showing as it mixes very fast 50 times.
    • Solve
      • Solves the cube in (usually always) 20 moves or less.
      • It takes a variable amount of time, depending on the power of the computer, for this function to work after you load the program because processing tables must be created. The tables are made while the program is being used and the progress is shown on this menu item and in the title bar.
      • Once the table loading has reached 100%, the solve function can be used which can get the answer in the vicinity of instantaneously to 2 seconds. Once it has found the answer it will solve the whole cube move by move. While in the solving process, the answer is displayed in the title bar.
      • Two-Phase solve algorithm by Jelinek Josef
    • Step Solve (Keyboard Shortcut S)
      • Solves just like the previous menu item but doesn’t show the next step until told to do so.
    • Solve Parameters
      • Makes the solver terminate when any of the selected options are satisfied. Either option can be satisfied to make it stop.
    • Learn To Solve
      • Opens up a tutorial teaching a person how to solve the cube in 18 steps.
    • Step Examples
      • Lets you step through the example solutions instead of just showing them, as in the “solve” and “step solve” options. Use the step solve (or S key) to continue the solution.
    • Colors
      • Brings up a dialog window that allows the selection of the colors by clicking. Once a color is selected, when clicking on a face in the main window, its colors will be changed to the selected color, allowing customization of the cube.
      • If an already selected color is clicked, a “choose color” dialog box opens, allowing the user to redefine it. These new colors are saved and reloaded when saving/opening a cube.
    • Multi Angles
      • Opens a window with multiple fixed angles shown.
    • Resize Buffer
      • Resizes the backbuffer to the windows current size to make it look sharper.
    • Display Axis
      • Toggles the axis display
    • Rotate Side Style
      • Drag - Default (Explained under controls).
      • Arrow - Makes an arrow pop up depending on where and which face you are over, and rotates the face accordingly when clicked.
    • Turn Style
      • 2-Axis
        • Hold down the right click button in the window and move it to rotate.
        • Moving the mouse left and right rotates in the X direction.
        • Moving the mouse up and down rotates in the Y direction.
      • Drag - Default (Explained under controls).
    • Start Timer
      • Start the timer running in the display bar.
    • Pause Timer
      • Pauses the timer indefinitely until started again from the above function.
    • Clear Timer
      • Completely clears the timer and turns it off.
  • About
    • Opens up the about window, which also links to this page

The solution displays the side of the face to turn in each step. The sides of the face are referred to as U,D,F,B,L,R (Up,Down,Front,Back,Left,Right) and can be determined by looking in the color dialog.
The face that is listed in the answer should be itself turned either:
  • Clockwise if there is no symbol after it
  • Counterclockwise if there is a ' after it
  • 180 Degrees (2 turns or halfway around) if there is a 2 after it
To determine clockwise and counter clockwise:
  • If it’s a side face, just face it towards you with the top face still on top
  • If it’s a top or bottom face, position the front face forwards, and the bottom face goes the opposite way of the top.

The rotate face shortcut keys 1-9 are programmed in as follows:
  • 1: Front
  • 2: F/B Between
  • 3: Back
  • 4: Left
  • 5: L/R Between
  • 6: Right
  • 7: Top
  • 8: T/B Between
  • 9: Bottom
These keys do not turn the faces according to the solving clockwise/counter clockwise approach, but turn (1-3), (4-6), (7-9), all in the same direction.

The Multi-Angled Cubes are in the following Format:
NumberTop FaceLeft FaceRight Face

This program is in no way affiliated with the owner of the Rubik’s Cube trademark, Seven Towns Ltd. (http://rubiks.com).

A huge thanks goes to Jelinek Josef (http://cube.misto.cz) who made a great example of the Two-Phase Algorithm in C that my solve function uses (slightly modified).

Thanks also goes to Kutani for providing the arrow model, which he made in Maya, and also for general design advice.

I also did produce code to find the optimal solution for any cube in any possible state virtually instantaneously (within milliseconds), programmed about 75% in assembly, but unfortunately the hard drive space it takes to hold the table is approximately 28 terabytes, so it was not included. The link to that project is here.

This was programmed in Microsoft Visual C++ 6.0 w/ DirectX 9.0 SDK.

I never did end up releasing this until now on this site. It was pretty much made for a portfolio and as a little thing to do in my spare time.


Startup View Color Editor
Rubix: Startup View Rubix: Color Editor

Options (Orientation Axis, Side Turn Arrow, Cube Solution in title bar, Multi Views)
Rubix: Options

Cube Solution Teacher
Rubix: Cube Solution Teacher
Graphics, 3d algorithms, insane cube-i-ness
I’ve always been a bit obsessed with the rubiks cube...
Dakusan License v2.0 @ 2009-11-04 16:06:57 - Download

I have updated the licensing information across the board for my website and all its projects to the Dakusan License v2.0, a slightly modified version of the Original BSD License.

The Copyright page and all project downloads have been updated accordingly.

Added Readme files to all project downloads @ 2009-09-19 05:35:19

Binary and source zip downloads for all Projects now have readme files in them, except as mentioned below.

This only applies to the Draw Image Project in Web Scripts, and not the Directory Manager project (The only project zip file now without a readme).

Rubix Cube v1.0 @ 2008-06-09 08:59:27 - Download
Uploaded version 1.0 of the project and integrated the original ReadMe into the contents section.
To add comments, please go to the forum page for this project (guest comments are allowed for the Projects, Posts, and Updates Forums).
Comments are owned by the user who posted them. We accept no responsibility for the contents of these comments.

No comments for this Project