Introduction
The first version (ugly) was inspired by Lars Vandenberg's PHP imagecube script, but is much shorter. The main advantage is the transparent background. This version vas done just by reverse engineering of the Lars's code to enable to start make a more customized and flexible script.
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).
I included some additional colors to the standard ones. Background color can be specified, because transparency is missing (IE does not support required alpha transparency directly...).
There are three output formats available: png, gif (appears dithered), and jpeg or jpg (blures and distorts image...).
Look at the source text of this page to see how easy is to draw a nice cube now.
Source code available on request at [josef.jelinek@gmail.com].
Substitution of Lars Vandenberg's script
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
Example 1: Illustrating the CFOP system
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 |
Example 3: Ignoring parts of the cube
Only showing cross + pair |
Insert final pair and orient edges |
Only showing corners |