Rubik's Cube Simulator and Solver 1.0
File ID: 85773
Rubik's Cube Simulator and Solver 1.0 Description
Description: Run: >>digrub
This program allows the user to generate a Rubik's Cube in a number of ways:
1. Randomly scrambled
2. With predefined scramble
3. By reading state from webcam images
4. By manually inputting all fields
After having generated a cube, it can be manipulated using two types of commands. The first is the original Rubik's Code where the face is specified by F,B,L,R,U,D to realize a clockwise rotation of this face. An additional ' or 2 will respectively invert (counterclockwise) or double (180 degrees) the move. However, this only works on a 3x3x3 cube. Cubes of higher order can be manipulated by specifying the rotation axis, the row to rotate and the number of rotations, e.g. 'x23'.
Lastly, the program contains a solving mechanism that follows a beginners method:
1. Form a cross (correct edges)
2. Place + orient cornerpieces
3. Complete second layer
4. Make a cross on the third layer
5. Place and orient cornerpieces
6. Permute edge pieces to complete cube
This is not a very efficient way but it will solve the cube in most cases.
Remember that this is the very first beta-version, so any comments on bugs or other stuff that can be improved will be highly appreciated!
DESCRIPTION OF INCLUDED FUNCTIONS/FILES:
algrot.m - calculates how an algorithm changes under rotation of the cube.
digrub.fig - GUI figure main program
digrub.m - GUIDE-generated m-file to go with digrub.fig.
editstate.fig - GUI figure for manual input program
editstate.m - GUIDE-generated m-file to go with editstate.fig.
findpeeks.m - Peek-finder that is used to find the cube's position in a webcam image.
move2rub.m - converts a move of the form 'x11' to Rubik's Code 'B'.
rub2move.m - converts a move in Rubik's code to axile 'x11' form.
rubcross.m - searches for a cross on the cube.
rubgen.m - generates a cube
rubinfo.m - returns information about the cube state
rubopt.m - optimizes a move-sequence
ruborient.m - orients the cube
rubplot.m - plot a 3D image of the cube
rubrot.m - apply a move to the cube
rubrot2.m - rotate the entire cube
rubsolve.m - solve the cube
Related: calculates, Algorithm, functionsfilesalgrotm, included, highly, appreciateddescription, mfile, digrubfigeditstatefig, guidegenerated, programdigrubm, cubedigrubfig, figure, improved, Stuff, pieces, Complete, permute, cornerpieces
O/S:BSD, Linux, Solaris, Mac OS X
File Size: 174.1 KB
|More Similar Code|
abarcar's combined Shop and Quote System is a PHP based shopping cart system with photo equipment and furniture kit. Using this script you can display 'Forced forwarding' features along with group of images for all products. This shopping cart system is designed in such a way that products are to be quoted for its prices.
Carl's Python Tk And Tix Widget Thing is a widget helper (and code generator) on its way to becoming a gui builder and possibly a full-blown ide using the tk and tix widgets included in the standard python distribution.
RubikViewer is a simple GUI tool that enables rubik's cube rotation.
It is possible to perform all basic and advanced moves, perform batch patterns and saving the desired configurations.
Automates the creation of SQL INSERT statements for the "simple" attributes in a python object by creating a string of an object's attribute names and a corresponding string of that object's attribute values. Simple attributes are those...
this program takes the data from an IMU as the input and calculates the body's trajectory ,velocity and attitude .
it plots the velocities and euler angles vs time and the body's trajectory.
This M-File extends MATLAB's inbuilt dec2bin() and bin2dec() functions functionalities. When you enter a floating point number as 25.757 you expect to get the correspoing binary number and vice versa.Feel free to make corrections. But make...
Raven's antispam - powerful and invisible fighter against comment spam. No set-up necessary, install and forget.
JIGL is Brigham Young University's Java Image and Graphics Library, originally developed by Bryan Morse's lab at BYU.
HOWTOs access via menus and filemarks, including graphics grep tools for system searching, Daftnee Reader mode for Project Gutenberg reading, graphic interface to the GNU Project's Aspell program, and the Qonqitzewautl tool kit for other...
Atemu and Xatdb provide a simulator and debugger for devices and networks made up of AVR microprocessor devices, such as the MICA2 Mote.
|User Review for Rubik's Cube Simulator and Solver