• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

Introducing VisualCube - Dynamic Cube Images

Logiqx

Member
Joined
Jul 10, 2012
Messages
1,427
Location
Herts, UK
WCA
2015GEOR02
YouTube
Visit Channel
Stachu's site definitely works as I used it today.

Click the link and try the examples which all render in gif format.

If you still have issues it's likely your browser.
 

McubeS

Member
Joined
Jul 12, 2017
Messages
28
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?
 

TDM

Member
Joined
Mar 7, 2013
Messages
7,006
Location
Oxfordshire, UK
WCA
2013MEND03
YouTube
Visit Channel
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.
 

AndyK

Premium Member
Joined
Apr 5, 2009
Messages
173
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:

Lucas Garron

Administrator
Joined
Jul 6, 2007
Messages
3,718
Location
California
WCA
2006GARR01
YouTube
Visit Channel
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.
 
Joined
Feb 19, 2018
Messages
3
WCA
2018ROBB01
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?
 

XYZRyan123039

Member
Joined
May 7, 2018
Messages
1
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?
 

Brest

Moderator
Staff member
Joined
Sep 30, 2010
Messages
2,440
YouTube
Visit Channel
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.
 
Top