• Welcome to SpeedSolving.com — the world’s largest puzzle community!

    You’re currently browsing as a guest, which means you have limited access to discussions, resources, member profiles, and community features.

    Join 50,000+ cubers and puzzle enthusiasts from around the world to ask questions, share solves, improve faster, and be part of the community.

    Registration is free, fast, and easy — create your account today.

    Already a member? Log in here to hide this message and start participating.

Introducing VisualCube - Dynamic Cube Images

So, I was wondering how I could get VisualCube to work so that I could create any image that I'd like.

Or is it complicated?
 
Could you show, or give a demonstration?
There are six examples near the top of the page, but I'll explain how a couple of them work:

visualcube.php

URL: fmt=svg&size=200&alg=S2M2E2
fmt=svg: this is the file format
&: separates the parameters
size=200: height/width of image
alg=S2M2E2: The cube starts solved, and then the alg S2 M2 E2 is applied to it.

visualcube.php

URL: fmt=svg&size=200&view=plan&case=RUR%27U%27R%27U2RUR%27UR2U2R%27y2&arw=U1U5,U5U1,U3U7,U7U3
fmt=svg: file format (as before)
size=200: size of image (as before)
view=plan: Only shows the top layer of the cube. This is useful for LL algorithms.
case=RUR'U'R'U2RUR'UR2U2R'y2: The cube will show the case solved by the given algorithm. Notice how this is different to the "alg" parameter: alg applies the algorithm to the solved cube. case applies the inverse algorithm. Also note that you can type algs normally into the URL bar, but after you hit enter, any spaces you leave in will become %20 and any 's (primes) will become %27. But don't worry about that: just type in the algorithm normally!
arw=U1U5,U5U1,U3U7,U7U3: The arrow (arw) parameter can be a bit tricky, but you won't use it often anyway. Just in case you want to know: on each face (U, R, F, D, L, B), the stickers are labelled from 0 to 8, going in rows. "U1U5" makes an arrow pointing from sticker 1 on the U face to sticker 5 on the U face. The arrows are separated by commas (there are four arrows in this picture, because you can't make double-pointed arrows. Instead you put one arrow in each direction).

visualcube.php

URL: fmt=svg&size=200&pzl=7&cc=grey&r=z-15x-105&sch=yyyyyy&fc=ynyyynynnnynnnyyyyyyyyynnnyynyynyynnnyyynnynnnnny
pzl=7: The puzzle is a 7x7x7
cc=grey: The cube colour (the colour of the "plastic") is grey
r=z-15x-105: This rotates the cube slightly. Again, you won't use this much.
sch=yyyyyy: This changes the cube's colour scheme to have yellow on all sides.
fc=ynyyynynnnynnnyyyyyyyyynnnyynyynyynnnyyynnynnnnny: This long string is defining what the front face has on it. You can override the normal colour scheme with this parameter. It goes in rows, with y representing yellow and n representing black:
ynyyyny
nnnynnn
yyyyyyy
yynnnyy
nyynyyn
nnyyynn
ynnnnny
If you were to carry this long string of letters on for longer, it would define what happens on the other faces too.
 
Would anyone know how to modify/add to the code of Visualcube to have the script keep a cache of the previous 500 or so images rendered?

This way if a website asks the script to render an image such as this:
then Visualcube would render it once upon first request, but each time the image is accessed afterward, only the static image previously rendered would be transmitted

The goal of this modification would be to stop the need for the server to re-render an image it has recently rendered, thus decreasing server load
 
Last edited:
Would anyone know how to modify/add to the code of Visualcube to have the script keep a cache of the previous 500 or so images rendered?

Look in the source for the following:

Code:
    // Whether image caching is enabled. NOTE: if enabled a cron
    // job will need to be set up to prune the database
    $ENABLE_CACHE = false;
  
    // Maximum size of image to be cached
    $CACHE_IMG_SIZE_LIMIT = 10000; // 10Kb

Note that the cache uses MySQL.
 
This may be off topic, but most of the images in the ELL Database page are simply wrong. They do not correspond to the algorithms in the ELL Database. It is my understanding that these images are generated by VisualCube.php and so my question is: is the Database wrong? or is VisualCube wrong?
 
I want to make some visual representations of 3x3 stage parity cases, F2L cases, and LL cases. I want to use VisualCube to create them, but creating the images require links to be made, and I am confused. Can someone help me out?
 
I want to make some visual representations of 3x3 stage parity cases, F2L cases, and LL cases. I want to use VisualCube to create them, but creating the images require links to be made, and I am confused. Can someone help me out?
http://cube.crider.co.uk/visualcube.php

Scroll down to the example images and you can click each cube to see how it was generated.
Then below that there is a list of variables that you can add to the url to modify the output.
If you need more help after exploring these, ask again with specific goals.
 
Back
Top