
                      MAGIC CUBE 4D INSTRUCTIONS

GENERAL INFORMATION:

Note that that program prints some information to standard output and
standard error.  Also, by default, it creates the file .magiccube4dlog
in your home directory.  You may override this behavior by using the
-logfile commandline option, the logfile X resource, or the
M4D_LOGFILE environment variable as described below.


MOUSE:

<Left click> - performs a 4D "twist" on the selected "face" counter-clockwise
    about the axis from the center of that "face" out through the center of
    the selected "sticker".
<Right click> - clockwise "twist".
<Control><Left click> - counter-clockwise twist of two slices
<Control><Right click> - clockwise twist of two slices
<Shift><Left click> - counter-clockwise twist of the whole puzzle
<Shift><Right click> - clockwise twist of the whole puzzle
<Middle click> - 4D "rotate" of the selected "face" to the center.
<Shift><Middle drag> - rotates the 3D scene.


UNDO/REDO: undo or redo the most recent twist


SCRAMBLE:

1..8 - Performs the selected number of random twists.
20   - Fully scrambles the puzzle (20 random twists).


RESET: restore the puzzle to its pristine (fully solved) state.


NEW PUZZLE: create a new puzzle of the specified size


QUIT: save and quit


KEYBOARD KEYS:

h or ?: print help to standard output
m: followed by another key -- "mark" state
' or `: followed by another key -- revert to "mark"ed state
u: undo
r: redo
s or C: cheat -- solve puzzle
w: make background white
b: make background black
o: toggle sticker outlines
c: clear (reset)
q: save and quit
shift-1-9: scramble 1-9 moves
S: full scramble
x: twirl puzzle to the right
X: twirl puzzle to the left
y: tilt puzzle forward
Y: tilt puzzle backward
CTRL-S: save

Additionally, the number keys act like modifier keys.  When a given
number key is down, that slice will move in addition to the top slice
for a move.


COMMANDLINE OPTIONS:

-outline:          outline stickers
-redraw:           redraw after each move -- useful for debugging
-rightmacros:      put the macro buttons on the right rather than below
-no-buttons        turns off menus and buttons -- for experts
-faceshrink x:     amount by which faces are shrunk in 3D projection
-degrees n:        the number of degrees each tilt or twirl moves the puzzle
-nframes180 n:     how many frames of animation are used for a 180-degree twist
-nframes120 n:     how many frames of animation are used for a 120-degree twist
-nframes90 n:      how many frames of animation are used for a 90-degree twist
-eyew n:           position of the "eye" in 4-space, on the +W axis
-eyez n:           position of the eye in 3-space, on the +Z axis.
-nshades           number of shades to use when showing shadows
-tilt n:           initial tilt (left-right position)
-twirl n:          initial twirl (forward-backward position)
-nscramblechen n:  how many twists the "S" key above makes -- default is 20
-logfile file:     save file name -- default is ~/.magiccube4dlog
-stickershrink x:  amount by which stickers are shrunk in 3D projection
-face1 color:      color of face 1
-face2 color:      color of face 2
-face3 color:      color of face 3
-face4 color:      color of face 4
-face5 color:      color of face 5
-face6 color:      color of face 6
-face7 color:      color of face 7
-face8 color:      color of face 8


X RESOURCES:

The client class for this puzzle is "MagicCube4D".

outline: same as -outline
redraw: same as -redraw
rightmacros: same as -rightmacros
nobuttons: same as -no-buttons
faceshrink: same as -faceshrink
degrees: same as -degrees
nframes180: same as -nframes180
nframes120: same as -nframes120
nframes90: same as -nframes90
eyew: same as -eyew
eyez: same as -eyez
nshades: same as -nshades
tilt: same as -tilt
twirl: same as -twirl
nscramblechen: same as -nscramblechen
logfile: same as -logfile
stickershrink: same as -stickershrink
faceColor1: same as -face1
faceColor2: same as -face2
faceColor3: same as -face3
faceColor4: same as -face4
faceColor5: same as -face5
faceColor6: same as -face6
faceColor7: same as -face7
faceColor8: same as -face8


ENVIRONMENT VARIABLES:

M4D_LENGTH: initial number of stickers per edge -- default 3
M4D_OUTLINE: same as -outline
M4D_DRAW_NEW_STATE: same as -redraw
M4D_MACROS_ON_RIGHT: same as -rightmacros
M4D_NO_BUTTONS: same as -no-buttons
M4D_FACESHRINK: same as -faceshrink
M4D_INC: same as -degrees
M4D_NFRAMES_120: same as -nframes120
M4D_NFRAMES_180: same as -nframes180
M4D_NFRAMES_90: same as -nframes90
M4D_EYEW: same as -eyew
M4D_EYEZ: same as -eyez
M4D_NSHADES: same as -nshades
M4D_TILT: same as -tilt
M4D_TWIRL: same as -twirl
M4D_NSCRAMBLECHEN: same as -nscramblechen
M4D_LOGFILE: same as -logfile
M4D_STICKERSHRINK: same as -stickershrink


MACROS:

To create a macro, click on the Create button and follow the
instructions.  You will be required to select three reference
stickers.  These stickers will need to be suppled again when applying
the macro.

There is a bug that when you create your first macro, the macro area
doesn't redisplay properly.  If you quit and restart magiccube4d, the
macro will display properly.
