Main features

2x2x2 3x3x3 4x4x4

Introduction

The first version was inspired by Lars Vandenberg's PHP imagecube script, but is much shorter. The only advantage is that it is a GIF with 1-bit transparent background. This version vas done just by rewriting the Lars's code to enable to start make a more customized and flexible script.

HTML code used is
<img src="picube.php?fl=xgpxbyxoxybywwyyyyrrrrrrooo" alt="">
<img src="picube.php?fl=ywywywywybgbgbgbgbrorororor" alt="">

Download PICube source code

The second second version uses resampling to enhance the visual quality, but may be slower (who cares, anyway). Now, it looks close to the picture taken from Gilles Roux's site (the left image is the original Gilles's gif).

HTML code used is
<img src="icube.php?fl=orobroooolyllgllgllwlllllll" style="background: #E6E6E6">

I included some additional colors to the standard ones. You can see on the last picture that the size is also configurable (default is 100x100).

HTML code used is
<img src="icube.php?fl=xgpxbyxoxybywwyyyyrrrrrrooo">
<img src="icube.php?fl=robgwyldxkcpmrobgwyldxkcpmr">
<img src="icube.php?fl=ywywywywybgbgbgbgbrorororor&amp;size=50">

You can visualize different view angles that are implemented by mirroring the image internally in the script - parameter 'm', values 'x', 'y', or 'xy'. (Surprised by 4x4x4? See bellow.)

HTML <img> src parameters used are
icube.php?n=4&fl=xpxyowrrbygywygowbgwyowrrxyorgybrrwyrwybwyowbgwb
icube.php?n=4&fl=xpxyowrrbygywygowbgwyowrrxyorgybrrwyrwybwyowbgwb&m=x
icube.php?n=4&fl=xpxyowrrbygywygowbgwyowrrxyorgybrrwyrwybwyowbgwb&m=y
icube.php?n=4&fl=xpxyowrrbygywygowbgwyowrrxyorgybrrwyrwybwyowbgwb&m=xy

There is a functionality available that enables you to render any NxNxN cube. There is a new parameter 'n' set to cube size (2 for 2x2x2, 4 for 4x4x4, ... default value is 3). The 'fl' parameter takes 3 x N x N characters in this case (48 for 4x4x4, 75 for 5x5x5, ...). (I am sorry, if you got offended by the imposible color scheme, but I generated the stickers randomly to save time.)

HTML <img> src parameters used are
icube.php?n=4&fl=xpxyowrrbygywygowbgwyowrrxyorgybrrwyrwybwyowbgwb
icube.php?n=5&fl=yorgbwgyowbryo...cut...gybrrwyyowbw
icube.php?n=6&fl=rowrwygwrbwygo...cut...yorgybrrwyyo

For those that are even more concerned about the visual appearance of the cube there is 'b' parameter specifying border width of the stickers. Values should be in a range from 0 to about 200 (default is 25). There is also 'd' parameter to specify how far above the cube are the stickers. Values should fall between 0 and 100 (default is 5).

HTML <img> src parameters used are
icube.php?fl=ywywywywybgbgbgbgbrorororor&b=0&d=0
icube.php?fl=ywywywywybgbgbgbgbrorororor&b=200
icube.php?n=4&fl=ywywwywyywywwywybgbggbgbbgbggbgbrorororororororo&b=10
icube.php?fl=ywywywywybgbgbgbgbrorororor&b=100&d=100
icube.php?fl=ywywywywybgbgbgbgbrorororor&d=200

Experimental features

Look at the source text of this page to see how easy is to draw a nice cube now.

Donload ICube source code

There is an imagecube parameter generator developed by Joël van Noort you can use to simplify producing the image arguments.

Substitution of Lars Vandenberg's script imagecube.php and imagerevenge.php

To make switching between Lars's and the presented 'standard' script easier the script supports 'stickers' and 'size' parameters.

The following appendix shows using this script for the same situations shown at: Lars's imagecube page.

Note: Lars's script has the advantage of transparent background. Use his script if you cannot live without it (or the first version of the presented script).

Examples of Replacing imagecube.php by icube.php

Example 1: Illustrating the CFOP system

Scrambled cube Cross solved F2L solved F2L + OLL solved Cube solved

Scrambled cube

Cross solved

F2L solved

F2L + OLL solved

Cube solved

Example 2: Various sizes

50x50 pixels 75x75 pixels 100x100 pixels 150x150 pixels 200x200 pixels

50x50 pixels

75x75 pixels

100x100 pixels

150x150 pixels

200x200 pixels

Example 3: Ignoring parts of the cube

Only showing cross + pair Insert final pair and orient edges Only showing corners

Only showing cross + pair

Insert final pair and orient edges

Only showing corners

Examples of Replacing imagerevenge.php by icube.php&n=4

Example 1: Illustrating the centres first system

Scrambled cube Centres solved Edge pairs solved 3x3x3 step solved

Scrambled cube

Centres solved

Edge pairs solved

3x3x3 step solved

Example 2: Various sizes

50x50 pixels 75x75 pixels 100x100 pixels 150x150 pixels 200x200 pixels

50x50 pixels

75x75 pixels

100x100 pixels

150x150 pixels

200x200 pixels

Example 3: Ignoring parts of the cube

Only showing centres Ignoring corners Only showing corners

Only showing centres

Ignoring corners

Only showing corners