Jelinek's Java Applet for Animating the Rubik's Cube

version 3.5b

Created by Josef Jelinek 2001-2004


Introduction

Purpose of this applet:

Main features of this applet:

Note: The native antialiasing is included in Java2 that is not generally supported by web browsers and is not used in this applet. The perspective projection uses bilinear interpolation to display inner face points for the sake of efficiency.

Note: To make this applet work you need a Java-enabled internet browser. If your browser does not contain Java plugin, you have to download one e.g. here (look for the Java browser plug-in).


Download

This program is classified as freeware. You can use it in your web pages. When you want to use the applet in your pages, send me an e-mail. You can modify the applet. However, I would like to see any modifications you do. In addition, you can ask me for the modification. It could be easier for me to add it, because code is not designed for legibility - many algorithms are encoded into tables that are fast and flexible but hard to understand.

Applet class in the .jar file (14kB)

Applet class (32kB)

Source code (67kB)

To use the applet in your web pages downloading the "jar" archive is sufficient.


Changes

version 3.5b


version 3.5


Controls

Controls of this applet are quite intuitive. You can rotate the whole cube as well as separate layers using the mouse. To rotate separate layers use dragging in natural directions with the left mouse button pressed. To rotate the whole cube use the shift button while dragging or the right mouse button or drag from the point outside the cube image. (Sometimes right mouse button dragging can cause problems - not an applet bug.) The possibility to edit the cube can be disabled in a web page. Then only the whole cube rotation is allowed. You can control the animation by the buttons in the button bar. The animation can be immediately set to any position using progress bar (if present) just above the button bar. The browser status bar shows context help about buttons.

The animation can be applied more times as well as interleaved with direct manipulation to allow a user experiment if he/she wants to. The first button (rewind) always clears the cube to the initial state - resets facelets, position, twisted layers and mirroring. The middle button has two purposes: When the animation is playing it can stop the animation; when the animation is stopped it mirrors the cube view to allow a user to experiment with symmetric positions. The cube can be rotated by mouse even if the animation is started. If you press button in the middle of animated layer twist, the twist is finished immediately and the new requested action is started.

In some cases the button bar can be reduced or totally hidden by a page designer.

You can try to play with the applet at the beginning of the page.


Using Applet in Web Pages

This section describes using the applet in your own web pages. To use the applet you should add one of the following codes to the place you want in the html file. The tag with archive attribute needs only the "jar" archive to work and saves space and downloading time. The second tag needs only the "class" file to work.

  <applet code="AnimCube.class" archive="AnimCube.jar" width=120 height=139>
    parameters
  </applet>
  <applet code="AnimCube.class" width=120 height=139>
    parameters
  </applet>

The size (width and height) is arbitrary and can be flexibly adjusted. For the best appearance the height should be equal to width + 19 if the button bar is displayed and width if the button bar is hidden or only "rewind button" is displayed. The parameters should be substituted with a combination of the following lines with the values changed accordingly.

<param name="config" value="fff...">
<param name="bgcolor" value="hhhhhh">
<param name="butbgcolor" value="hhhhhh">
<param name="colorscheme" value="cccccc">
<param name="colors" value="hhhhhh...">
<param name="position" value="ppp...">
<param name="speed" value="nn...">
<param name="doublespeed" value="nn...">
<param name="perspective" value="nn...">
<param name="scale" value="nn...">
<param name="align" value="d">
<param name="hint" value="nn...">
<param name="buttonbar" value="d">
<param name="edit" value="d">
<param name="movetext" value="d">
<param name="fonttype" value="d">
<param name="metric" value="d">
<param name="move" value="mmmmmmmmm...">
<param name="initmove" value="mmmmmmmmm...">
<param name="initmove" value="#">
<param name="initrevmove" value="mmmmmmmmm...">
<param name="initrevmove" value="#">
<param name="demo" value="mmmmmmmmm...">
<param name="demo" value="#">
<param name="facelets" value="xxxxxx...xxxxxx">
<param name="pos" value="aaaaaa...aaaaaa">

Example: The following two applet windows show the intro-applet (not in demo mode) with different aspect ratios (width and height).

The next sections describe all parameters.


Parameters

config parameter

The config parameter takes the file name as a value. The file location has to be specified relative to the location of the HTML document that uses it. This restriction is set to unify the functionality on both internet and local locations. The file format is simple. It consists of lines, each specifying a default value of a particular parameter. Each line starts with the parameter name followed by the equal sign '=' and the rest of line contains the parameter value. Do not use quotes to surround neither the name nor the value. White-space characters can be used to surround the name and value. All default values specified in the configuration file can be overwritten by applet parameters.

This parameter simplifies the page maintenance and enables a user to modify behavior of more applets in a page by the modification of one configuration file.

Example: <param name="config" value="AnimCube.cfg"> sets all parameters to the default ones found in the file "AnimCube.cfg". The file contents can be of the following form:

    bgcolor=ffffff
    butbgcolor=99eebb
    movetext=1

These settings sets the default values of background colors and enables text displaying for all applets with this config parameter. The following two applets have only three parameters (config, move and initrevmove) and differ only in move. The third applet has the same parameters as the first one except for missing config.

bgcolor parameter

The bgcolor parameter determines the background color of the applet. This parameter can be set to the background color of your page in order to omit visual color collisions. If this parameter is missing, the color is set to middle grey. The value of the parameter consists of six hex digits and is case insensitive. The meaning of these digits is equal to the RGB color specification in HTML. The move counter is outlined to allow good visibility for any color.

Example: <param name="bgcolor" value="ff0000"> sets the background color to red.

butbgcolor parameter

The butbgcolor parameter determines the color of the control buttons. It is very similar to the bgcolor parameter and has the same format. If this parameter is missing, the color of the buttons is set to value of bgcolor. The button symbols are outlined to allow good visibility for any color.

Example: <param name="butbgcolor" value="00ff00"> sets the background color of the button bar to green.

colorscheme parameter

This parameter is used to set the coloring scheme of the solved cube. In combination with initmove / initrevmove can in some cases replace facelets of pos. It is mutually exclusive with facelets and pos and has the lowest priority.

The value must consist of exactly six characters that determine the color of the corresponding face. The face order is: Up, Down, Front, Back, Left and Right. The color codes are shown in the table in facelets parameter section. The default value is: "WYORGB".

Example: <param name="colorscheme" value="wborgy"> sets the coloring scheme to the "american" style white opposite to blue. <param name="colorscheme" value="456789"> sets the coloring scheme to the grayed default scheme, because the digits 4 to 9 represent configurable colors initialized to colored greys and are discussed in the facelets and colors sections. <param name="colorscheme" value="wwrrbb"> sets the coloring scheme to the tricolor scheme, that uses only three colors with the same colors on opposite faces.

colors parameter

This parameter can be use to set nine configurable color items to custom colors. The colors are given in the value string in RGB format. The RGB values follows immediately in the sequence "RGBRGBRGB...". Each RGB triple sets the corresponding color starting from the color 0 up to color 9. The colors can be accessed in other tags (facelets and colorscheme) using characters '0', '1', ..., '9'. The default colors contain colored greys that first appeared in the Lars's applet. All the default colors are shown in facelets section.

Example: <param name="colors" value="FF888888FF888888FF88FFFFFF88FFFFFF88"> in combination with <param name="colorscheme" value="012345"> sets the coloring scheme to bright primary and secondary colors (red, green, blue, cyan, magenta, yellow).

position parameter
This parameter can be used to set the initial position of the cube (its rotation). The value can be of any length and can contain characters: 'u', 'd', 'f', 'b', 'l' and 'r' in upper or lower case. The rotation steep is 15 degrees. The default value is "lluu". The rotation axis and direction is similar to rotation of layers, etc.

Example: <param name="position" value="llllluu"> turns the whole cube in the following way.

speed parameter

This parameter allows to customize the animations speed. The value should consist only of decimal digits. The higher value the slower is the animation. The default value is 10, which corresponds to approximately 1 second for face turn and approximately 2/3 seconds for quarter turn if not specified differently. The face turn speed can be adjusted separately by doublespeed.

Example: <param name="speed" value="5"> and <param name="speed" value="20"> has the following effect on the animation speed.

Note: Here you can try run both applets simultaneously without slowing down. You can also try multiple application of the same move sequence to the cube by pressing play button after animation stops and see how the top corners are twisted and moved. Some of the other buttons can be also used this way.

doublespeed parameter

This parameter allows to customize the speed of face turns separately from quarter turns. The value should consist only of decimal digits. The higher value the slower is the animation. The default value is 10, which corresponds to approximately 1 second for the face turn. The quarter turn speed can be adjusted by speed. If the parameter doublespeed is missing, the default is set to the 150% of the value of speed.

Example: <param name="doublespeed" value="10"> and <param name="doublespeed" value="20"> has the following effect on the animation speed.

perspective parameter

This parameter allows to customize the perspective deformation of the cube. The value should consist only of decimal digits. The higher value the closer to a parallel view. The default value is 2.

Example: <param name="perspective" value="0">, <param name="perspective" value="5"> and <param name="perspective" value="1000000"> has the following effect on the perspective projection.

scale parameter

This parameter allows to customize the size of the cube. The value should consist only of decimal digits. The higher value the smaller cube. The exact size is computed as 1 / (1 + scale / 10). The default value is 0 that causes the cube to fit in window. The parameter is useful in combination with hint and/or movetext.

Example: <param name="scale" value="0">, <param name="scale" value="5"> and <param name="scale" value="10"> has the following effect on the cube size.

align parameter

This parameter allows to position the cube vertically. The only permitted values are "0" for top-align, "1" for center-align and "2" for bottom align. The default value is 1. The parameter makes sense in combination with scale.

Example: <param name="align" value="0">, <param name="align" value="1"> and <param name="align" value="2"> has the following effect on the cube position.

hint parameter

This parameter allows to display some of the facelets that face off the user. The value should consist only of decimal digits. The higher value the further are the facelets from the cube. The default value is no value, that means no hint at all. Usable values are from 2 to 10, but you can try to experiment. The good visual arrangements can be accomplished in combination with scale.

Example:

  • <param name="hint" value="2">
  • <param name="hint" value="5">
  • <param name="hint" value="10">
has the following effect on the hint displaying.

Note: I have been inspired by the idea in the Lars Petrus's applet while implementing this parameter.

buttonbar parameter

Using this parameter the button bar containing animation controls can be customized. There are three possible values: "0", "1" and "2". The zero value means no buttons at all. The value equal to one causes the full button bar to appear. The value set to two shows only one button that is used to clear the cube state to the initial values.

If this parameter is not specified then there are several default settings. If move is specified then the full button bar is displayed. If move is missing then only the clear (rewind) button is shown.

Example: <param name="buttonbar" value="0">, <param name="buttonbar" value="2"> and <param name="buttonbar" value="1"> give the following results.

Note: In the third example you can see that the cube is smaller although the window has the same size as for the first two examples. This is caused by an automatic adjustment of the cube that fits it in the window. If you want to use full button bar, you should increase the height of the (square) applet window by 13 (that is the default height of the button bar).

edit parameter

This parameter can disable the possibility to twist cube layers with a mouse. There are two possible values: "0" and "1". The zero value means that cube can be only in compact state and separate layers cannot be twisted. The value equal to one enables the edition capability. The cube can be edited by default.

Example: <param name="edit" value="0"> and <param name="edit" value="1"> give the following results.

movetext parameter

This parameter can enable the textual representation of the move sequence inside the applet window. There are five possible values: "0", "1", "2", "3" and "4". The zero value means that the textual representation of the move is not displayed. The value equal to one enables displaying the move in one of the most common notation (using modifiers 'm', 'c', 't', 's' and 'a' to support various types of turns). The value equal to two enables displaying the move in the shortened notation (using move characters 'M', 'E', 'S', 'X', 'Y', 'Z', and lowercase basic letters as 'u'). See the move parameter description for examples.

To support another standard (described at speedcubing.com) where the meaning of 'Y' and 'Z' is interchanged, you can use the parameter value 3. Other moves are the same as for the parameter value 2. The value set to 4 sets displaying middle slice moves to lowercase letters and the whole cube turns to use the prefix 'Q'. However, these two representations (used by the values 3 and 4) cannot be used to specify the value of input moves (e.g. in the move parameter) because of symbol meaning collisions.

The move is not shown by default (the default value is "0").

Example: <param name="movetext" value="0">, <param name="movetext" value="1">, <param name="movetext" value="2">, <param name="movetext" value="3"> and <param name="movetext" value="4"> give the following results for the same values of other parameters.

fonttype parameter

This parameter can adjust the appearance of the displayed text. There are two possible values: "0" and "1". The zero value means that all texts are displayed in the standard format with the black or white color depending on the background color. The value equal to one enables displaying all texts with outlined font (black outline around white text) and is used to increase legibility for strange background colors. The used font is outlined by default (the default value is "1").

Example: <param name="fonttype" value="0"> and <param name="fonttype" value="1"> give the following results for the same values of other parameters. The next two examples shows the appearance after the background was changed to darker color.

metric parameter
Using this parameter the move counter can be adjusted to various metrics. There are four possible values with the following meaning:
  • 0 - no metric: each animation step is counted as one step
  • 1 - quarter-turn metric: rotation by 90 degrees (any direction) of any single layer is counted as one move; cube rotation is not counted
  • 2 - face-turn metric: rotation by 90 or 180 degrees (any direction) of any single layer is counted as one move; cube rotation is not counted
  • 3 - face-turn metric: rotation by 90 or 180 degrees (any direction) of any single layer or two adjacent or opposite parallel layers is counted as one move; cube rotation is not counted
The default value is "0". The used metric can be seen as a character after the move counter.

Example:

  • <param name="metric" value="0">
  • <param name="metric" value="1">
  • <param name="metric" value="2">
  • <param name="metric" value="3">
give the following results for the same values of other parameters.

move parameter

Move sequence is defined in extended Singmaster's notation. The basis for the turns are six letters of the following meaning.

  • U - Up (rotate top layer)
  • D - Down (rotate bottom layer)
  • F - Front (rotate front layer)
  • B - Back (rotate back layer)
  • L - Left (rotate left layer)
  • R - Right (rotate right layer)
The letter case is important here, because the same - but lowercase - letters are used for different moves. Modifiers can be appended to the move character.
  • Separate characters mean turning the corresponding layer 90 degrees clock-wise.
  • Appending apostrophe "'" or digit "3" means turning 90 degrees counter clock-wise.
  • Appending digit "2" means 180 degrees rotation of the corresponding layer (clock-wise).
  • You can use combination "2'" for double counter clock-wise turn. This combination is useful if you want to show the most efficient directions when using finger shortcuts.
To see the effect of these character sequences see the table below (press play to see the move and "next sequence" button - in the top-right position - to see other faces).

X X' X2 X2'

There are also some advanced modifiers that are written immediately after the move letter and right before the basic modifiers already defined. The possible modifiers are:

  • m - middle layer turn between the specified layer and the opposite one
  • c - whole-cube turn in the direction of the specified layer
  • s - slice turn; two opposite layers are turned in the same directions ("Rs" is equal to "R L'" or "L' R")
  • a - anti-slice turn; two opposite layers are turned in the opposite directions ("Ra" is equal to "R L" or "L R")
  • t - thick turn; two adjacent layers (the specified one and the adjacent one) are turned simultaneously

Some of these modifiers can be omitted using extended move character set defined below. These advanced modifiers were added so as to reflect the agreement of cubists on the extended notation. It is quite orthogonal and consistent design. Examples are given in the following table.

Xs Xs' Xs2 Xs2'
Xa Xa' Xa2 Xa2'
Xm Xm' Xm2 Xm2'
Xt Xt' Xt2 Xt2'
Xc Xc' Xc2 Xc2'

The applet supports some additional characters to represent specific moves. The center layers can be rotated using the following characters in combination with previous modifiers.

  • E - equator (between U and D layers in the U'/D direction)
  • S - standing (between F and B layers in the F/B' direction)
  • M - middle (between L and R layers in the L/R' direction)

The following table shows the effect of these characters.

X X' X2 X2'

The applet also supports turns of the entire cube. This feature can be used to rotate the cube in order to show the cube in the best position for the current situation to watch the move sequence. The available symbols to rotate the cube are shown in the following table (they can be also combined with the modifiers).

  • X - rotate around x-axis (in the same direction as "R" or "L'" is performed)
  • Y - rotate around y-axis (in the same direction as "F" or "B'" is performed)
  • Z - rotate around z-axis (in the same direction as "U" or "D'" is performed)

The following table shows the effect of these characters.

X X' X2 X2'

There is also a possibility to rotate two adjacent layers simultaneously. The notation and meaning is similar to the face-layer rotations, but the letters are in lowercase.

  • u - up (rotate two top layers)
  • d - down (rotate two bottom layers)
  • f - front (rotate two front layers)
  • b - back (rotate two back layers)
  • l - left (rotate two left layers)
  • r - right (rotate two right layers)

The following table shows all cases.
X X' X2 X2'

There is yet another character to be used in the parameter value - the dot '.' character. When a dot is found in the sequence during playing the animation, it is delayed for a half of the time the quarter turn is performed.

It is possible to use text comments in the parameter value. Such comments appear at the top of the applet while the animation is perfermed. The text to appear must be enclosed in braces - '{' and '}' characters. Text can be specified in both the demo and move parameter. Text can be only on one line however there can be as many texts as necesary to appear at the given place within the animation.

There can be more move sequences specified in one applet. However, the initial cube configuration can be still only one (in the current state of development). More move sequences can be specified in the move parameter. The sequences are separated by the semicolon character ';'. The sequences can be also empty.

Example: <param name="move" value="R2' U M U' R2' U M' U'"> and <param name="move" value="{right index finger - U} R2' U r' {}.{right thumb - U'} R U' {}..{right index finger - U} R2' U l' {}.{left index finger - U'} L U'"> are two different sequences showing one algorithm in different ways (the second one is more customized to fast finger shortcuts). The third example contains both sequences in one move parameter: <param name="move" value="R2' U M U' R2' U M' U'; R2' U r' R U' R2' U l' L U'">. The move in the second applet contains delays (represented by dots) and messages (enclosed in braces) to show the fingertricks more clearly. The animation is also speeded-up in this case.

Note: Some of the moves affect centers and they can be moved to another layer from the user's point of view. Such movements does not affect the notation from the user's point of view. The characters are not fixed to particular centers. There are other approaches (e.g. Lars's one) that assigns letters to face centers and if the cube is rotated, the same move can be performed on different layers from the user's point of view. I have chosen the the center-independent way because of consistency and easier maintenance. The main motivation were the center layers move. If you perform "M" and then you want to perform "F", it should affect the front layer you see in the front position and not the bottom layer, where the center that was in the front position is now placed. The chosen way is very familiar to the "corner-starters" (solving the cube starting from the corners).

initmove parameter

This parameter specifies the move to perform on the cube before start. This can be used to setup the clean cube to a certain position without using facelets. The format is the same as for move. If the value is set to "#" then the value is set to the value of the move parameter (the first one if more sequences are specified). This parameter is mutually exclusive with initrevmove and has lower priority.

initrevmove parameter

The meaning is the same as for initmove but the move is performed reversed (from end to start with opposite twisting direction). It is even more useful when the value is set to "#" and takes the move from the move parameter (the first one if more sequences are specified). See initmove for more details.

Example: To show the flexibility of the page creation using this applet suppose that we have more sequences affecting the same part of the cube. Other parts should remain either unchanged (dark gray) or we do not care about them (light gray). Instead of creating the facelets coloring for each configuration, we can create only one universal and use it in all corresponding applets while changing only the move. The initrevmove set to "#" creates the cube setup for us.

The HTML souce for these two applet vindows is shown below.

<applet code="AnimCube.class" archive="AnimCube.jar" width="120" height="139">
 <param name="facelets" value="YLYLYLYLY444444444OL6L66OL6RL7L77RL7BLBL9L999GL8L88GL8">
 <param name="move" value="R2 B2' R F R' B2' R F' R">
 <param name="initrevmove" value="#">
</applet>
<applet code="AnimCube.class" archive="AnimCube.jar" width="120" height="139">
 <param name="facelets" value="YLYLYLYLY444444444OL6L66OL6RL7L77RL7BLBL9L999GL8L88GL8">
 <param name="move" value="F2' U L' U L U' F2' U' L' U' L">
 <param name="initrevmove" value="#">
</applet>
demo parameter

This parameter can be used as a demonstration of various cube moves. The value format is the same as for move. If the value is set to "#" then the value is set to the value of the move parameter (the first one if more sequences are specified). The specified move is performed after page load and processes all the operations in loop from beginning to the end. The demo mode can be interrupted by any control button. The cube state and move sequence is then reiniated and the applet is prepared for regular operations.

Note: Do not overuse this parameter. It is recommended using only one applet per page with this parameter set.

facelets parameter

The facelets parameter contains color codes of all cube facelets. This parameter is mutually exclusive with the parameters pos and colorscheme and has the highest priority. The value of this parameter must have exactly 54 characters. Each character determines the used color. All possible colors and the corresponding character codes are in the following table. The characters '0' to '9' represent adjustable colors that can be setup to any color using the colors parameter.
0light orange
1pure red
2pure green
3pure blue
4white-grey
5yellow-grey
6orange-grey
7red-grey
8green-grey
9blue-grey
wwhite
yyellow
oorange
rred
ggreen
bblue
llight grey
ddark grey
mmagenta
ccyan
ppink
nlight green
kblack
anything else means grey

The following table shows the meaning of all positions in the facelets parameter. The parameter value can be divided into six parts. Each part consists of nine characters determining the facelet colors. To show the position of each facelet in one of the six groups (actually representing faces) each group in the table is set to the sequence of characters: 123456789. The other characters in the parameter value are set to middle gray. The second row contains the affected cube face for each group. The third row contains character positions in the parameter value for the corresponding group.
Up Down Front Back Left Right
1-9 10-18 19-27 28-36 37-45 46-55

To clarify the facelet layout the next picture shows the facelet positions in the parameter value (starting from 1).

Example: <param name="facelets" value="oywoyyoooCMCMYMCMC.dkl.dwl.PNCNCPCPNrgbgbrbrgYNGNNGGGG"> initializes the cube to the following (weird) configuration. (The mixed character case is used only to separate the faces.)

pos parameter

The pos parameter is similar to the facelets parameter and is supported because of the compatibility with the applet by Lars Petrus. Using this parameter the applet sets another unset parameters to proper values so as the appearance is as close as possible to the Lars's applet. If this parameter is used then default implicit parameters are:

  • <param name="bgcolor" value="FFFFFF">
  • <param name="position" value="UUUUFF">

This parameter is mutually exclusive with the parameters facelets and colorscheme. When used simultaneously facelets has higher priority and colorscheme lower.

The exact format of this parameter is not published here. You can find it on Lars's page. The colored greys using uppercase letters are supported. However, this parameter should be considered obsolete and used only for smooth replacement of Lars's applet with this applet.

Example: The following code is identical to the code on Lars's page, only the lrubik.class is replaced by AnimCube.class. You can compare the appearance yourself.

<applet code=AnimCube.class archive="AnimCube.jar" width=125 height=145>
<param name="pos" value="abaeacafbfadcbdfacaebccdeeffbeedacbdbdbcefcacefddffebd">
<param name="move" value="L2D1U2B2L1U3F1U3F1U3F3U3F2U2R2U1F1R3F3R1F3R2F1R3F1R1F3R2F1D1R2D3R3D1R1D3R3D1R3D3R2">
</applet>

However, the next two examples comes from the new Lars's applet examples that use extended notation for whole-cube and two-layer turns. Although the same symbols are used, the meaning of symbols in the notations is different. In addition, the Lars's applet uses turns relative to the cube-centers (e.g. if the Right center is moved into the Front position then move "R" is performed on that layer - on the Front layer from the user's point of view, if the cube was not rotated by a mouse). My applet uses turns that are independent of the particular cube centers. When doing "R" move the Right layers is turned regardless how many times the cube was turned by the performed sequence. Objective reasons for this way to handle the turns are given in the description of the move parameter.

To show the same results as Lars's examples do, the following conversions took place.

<param name="move" value="z2L2D1U2B2L1U3x3F1U3F1U3F3y1U3F2U2R2U1F1R3F3R1F3R2F1R3F1R1F3r2F1D1R2D3R3D1R1D3R3D1R3D3R2">

was converted to

<param name="move" value="z2R2D1U2F2R1U3y3B1L3B1L3B3x1L3D2L2F2L1D1F3D3F1D3F2D1F3D1F1D3b2U1L1F2L3F3L1F1L3F3L1F3L3F2">

and

<param name="move" value="R2 F B2 U2 R b' d B' D B' D' y3 B' D2 B2 L2 B D L' D' L D' L2 D L' D L D' L2 D F L2 F' L' F L F' L' F L' F' L2">

was converted to

<param name="move" value="R2 F B2 U2 R f' l U' R U' R' X' F' R2 F2 U2 F R U' R' U R' U2 R U' R U R' U2' R B U2 B' U' B U B' U' B U' B' U2">

The best way to understand the meaning of parameters is to experiment.


Known and/or Fixed Bugs

Minor bugs were fixed since last public version (incorrect twisting directions using mouse when the applet is mirrored was probably the most serious bug I noticed).

If you use Internet Explorer and the MS Virtual Machine you may sometimes notice a strange behavior (locking while turning a layer or playing animation). This is (as far as I know) caused by a bug in the JIT (just in time) compiler of the MS Virtual Machine. You can try to deactivate the JIT in the menu "Tools/Internet Options", tab "Advanced", section "Microsoft VM", checkbox "JIT compiler enabled". Uncheck this checkbox. You can also try to use the Sun's Java Virtual Machine plugin (the new version can utilize the <applet> tag). I hope I found all workarounds but if you notice this (or another) bug send me an e-mail.

In some browsers applets are not correctly redrawn when the browser window content is scrolled (this can sometimes happen when the scroll wheel is used). This is a problem of cooperation the between browser and applets repainting. This cannot be fixed in an applet and affects all other graphical applets. You can try to scroll or reload the page or start working with an applet and it will be repainted.

Another problem was noticed in some configurations of Sun's Java VM plugin when dragging outside the applet window using the right mouse button. This sometimes locks the Internet Explorer. This bug affects all graphical applets running on the same configuration and is out of scope of this applet. The solution is not to use the right button dragging on such configurations (use Shift + left mouse button dragging).

It is also interesting that the last released MS VM (it seems that is was really last one from MS!) is noticeably faster than the Sun's JVM (version 1.4.1) (measured in WinXP Task Manager).

If you realize any problem I would be glad to get any information (via e-mail) to be able to fix it.


Credits

Idea of this applet and some algorithms come from the original applet created by Karl Hornell and the derived applet with animation extensions made by Lars Petrus.

I would like to thank Ryan Heise and Gilles Roux for their nice comments and ideas.