# Introducing VisualCube - Dynamic Cube Images



## Cride5 (Sep 29, 2009)

I've just finished work on a new script to dynamically generate cube images.
For details on the parameters which can be set and what they do have a look at:

http://cube.crider.co.uk/visualcube.php

Here are some examples of what it's capable of:



 visualcube.png?bg=t&alg=M2S2E2&r=x25y34





 visualcube.png?co=30&co=12&fo=50&alg=U&pzl=2





 visualcube.png?bg=t&co=20&r=y25x-34&fd=tutuuututtrtrrrtrttftffftfttdtdddtdttltllltlttbtbbbtbt





 visualcube.png?bg=t&co=40&cc=n&fd=uuuutuuuurrrrtrrrrfffftffffddddtddddlllltllllbbbbtbbbb&r=y30x20





 visualcube.png?bg=005&cc=DDD&alg=RLUD&sch=FF0,F00,00F,005,650,0F0





 visualcube.png?bg=w&pzl=3&sch=wddddd&stage=ll&view=plan&case=RUR'URU2R'





 visualcube.png?bg=w&pzl=3&stage=ll&view=plan&case=R2U'R'U'RURURU'R




 visualcube.gif?alg=S2M2E2&arw=U0U2-s7,U2U8-s7,U8U0,R6R2R0-s8-i5-yellow


Enjoy 


EDIT: If you discover any bugs or have any feature requests, post them below and I'll do what I can to fix/implement your suggestion (within reason)...


----------



## Daniel Wu (Sep 29, 2009)

Wow! This looks pretty cool. I'm going to play with this for a while.


----------



## blade740 (Sep 29, 2009)

Wow. Definitely the prettiest PHP image generator out there.


----------



## shelley (Sep 30, 2009)

Wow, that's pretty awesome. Good work!


----------



## KubeKid73 (Sep 30, 2009)

I just saved all of the PLL algorithm pictures that I need to print onto flash cards so I can learn all of the PLLs. Thanks for this. It's really great and I was able to make it in my color scheme instead of the default that I would find if I just got the pictures from somewhere else.


----------



## teller (Sep 30, 2009)

Wow, nice work! Do you authorize embedding on other sites, or...?


----------



## dbax0999 (Sep 30, 2009)

This looks pretty sweet! And it's easy to use.


----------



## Cride5 (Sep 30, 2009)

Cheers for the positive feedback 



teller said:


> Wow, nice work! Do you authorize embedding on other sites, or...?



Yup, embedding on other sites is fine. I'll keep an eye on my bandwidth usage but don't expect it to max out any time soon. If you have control over uploads on your site though, I'd recommend saving the images locally your the server to prevent reliance on my hosting providers. After all, they haven't shown themselves to be the most reliable in recent times


----------



## Michiel van der Blonk (Oct 1, 2009)

I wrote a similar script, specifically for WordPress, but the PHP code can be used anywhere. Also, embedding can be done. It has different features from this one. The main extra it has is that it can either create an applet or an image, depending on parameters. Check out http://www.vanderblonk.com/tools/wordpress-rubik-plugin/

oh, and I like the transparency. Great. Is there source code available?


----------



## Cride5 (Oct 1, 2009)

Support for SVG output has been added, see:
http://cube.crider.co.uk/visualcube.php?fmt=svg




Michiel van der Blonk said:


> I wrote a similar script, specifically for WordPress, but the PHP code can be used anywhere. Also, embedding can be done. It has different features from this one. The main extra it has is that it can either create an applet or an image, depending on parameters. Check out http://www.vanderblonk.com/tools/wordpress-rubik-plugin/
> 
> oh, and I like the transparency. Great. Is there source code available?



The source is available under the GNU Lesser General Public License @ https://sourceforge.net/projects/vcube/


----------



## AvGalen (Oct 1, 2009)

Wow, wow, wow. Great work there

It would be very helpful to edit the topicstart so you can see what parameters where used to generate those example images


----------



## Escher (Oct 1, 2009)

Conrad, I love you. This is awesome, well done


----------



## Cride5 (Oct 1, 2009)

AvGalen said:


> Wow, wow, wow. Great work there
> 
> It would be very helpful to edit the topicstart so you can see what parameters where used to generate those example images



Good idea, changed...


----------



## LarsN (Oct 1, 2009)

Great work, I love it.

I wanted to display an f2l case for my beginners guide, so I used the "stage=f2l" variabel combined with the "case=" state definition. I was hoping that the mask on the last layer would follow the LL-pieces, but they didn't.

This is the f2l case with the corner in place and the edge in the last layer:

cube.crider.co.uk/visualcube.png?size=200&pzl=3&stage=f2l&case=R'U'R'U'R'URUR

I guess it wasn't meant to do as I hoped, but for my use it would be nice.


----------



## Musturd (Oct 1, 2009)

Awesome!


----------



## Cride5 (Oct 3, 2009)

LarsN said:


> Great work, I love it.
> 
> I wanted to display an f2l case for my beginners guide, so I used the "stage=f2l" variabel combined with the "case=" state definition. I was hoping that the mask on the last layer would follow the LL-pieces, but they didn't.
> 
> ...



Hi, thanks for the feedback. 

It turned out to be an issue with the core of the cube model, and proved to be quite an interesting problem to fix 

Anyway, it should work now. Basically, any facelet/face colour/mask definition you input is wrapped over the cube before the alg is applied, then the alg will permute the facelets/colours accordingly. See:
http://cube.crider.co.uk/visualcube.php?fmt=png&stage=f2l&case=RUR'
and (an example using a facelet definition)..
http://cube.crider.co.uk/visualcube...ttbbbbbbwwwwwwwwwtttooooootttgggggg&case=RUR'

The next planned features are:
(1) an option to draw arrows visualising permutations
(2) an new OLL plan view, specifically designed to highlight cubie orientations.


----------



## Cyrus C. (May 16, 2010)

Could you make a way to mask specific pieces? I need an image for a 4x4x4 where you can only see a 3x3x3 block.


----------



## joey (May 16, 2010)

Erm, you can do that with fd or fc.


----------



## Cyrus C. (May 16, 2010)

joey said:


> Erm, you can do that with fd or fc.



Oh, I thought that meant you had to do the whole cube with those three colours.


----------



## RubiksDude (May 16, 2010)

Yay! It's too awesome. I really needed something like this. It would also be helpful for beginners to learn intuitive F2L, cuz I really want to teach my friends with my style of teaching. Thanks! Oh, and I'll use Imagecube and/or Imagerevenge as backup, though I don't think I will need the back up.


----------



## TheMachanga (May 16, 2010)

I'm having trouble with that. I downloaded it, and now what? I just get the winrawr crap and just a bunch of codes.


----------



## Cyrus C. (May 16, 2010)

TheMachanga said:


> I'm having trouble with that. I downloaded it, and now what? I just get the winrawr crap and just a bunch of codes.



You don't need to download anything. You change the web address.


----------



## TheMachanga (May 17, 2010)

Cyrus C. said:


> TheMachanga said:
> 
> 
> > I'm having trouble with that. I downloaded it, and now what? I just get the winrawr crap and just a bunch of codes.
> ...



Point my browser?


----------



## Cyrus C. (May 17, 2010)

TheMachanga said:


> Cyrus C. said:
> 
> 
> > TheMachanga said:
> ...


Do you see the codes below that, you add those after it & it will link you to an image of that cube.


----------



## macky (Jun 16, 2010)

Thank you very much for this, Conrad. It saved me a lot of time when making my F2L page.

I uploaded the VisualCube folder to my host here. I made the following minor modifications:
- added stage masks 'f2l[br/bl/fr/fl]' for F2L with the the two letter slot empty
- add stage mask 'wv' (winter variation) for F2L and the last layer stickers (so also for MGLS and a lot of last layer control techniques)
- default color scheme and cube color, set here, can be retrieved from cookies. This should be useful for F2L and CLL.
For the other parameters, I think having a separate configuration file with default values would be nice.

I'm not sure what I should put down in the source code under the GNU license and how/if I should make the changes available, so let me know if there's a problem.


----------



## Cride5 (Jun 16, 2010)

macky said:


> Thank you very much for this, Conrad. It saved me a lot of time when making my F2L page.
> 
> I uploaded the VisualCube folder to my host here. I made the following minor modifications:
> - added stage masks 'f2l[br/bl/fr/fl]' for F2L with the the two letter slot empty
> ...



Hi Macky, the changes you've made sound good so I'd be happy to update the main source with them if that's OK with you. I'll send a PM...

I noticed that cubes generated from your server are rendering without antialiasing (giving a pixely appearance). Normally these rendering issues are related to the version of ImageMagick being used to generate the images. If you update ImageMagick on your server it should improve the rendering.


----------



## Coisox (Jun 17, 2010)

Thank you very much. I love it! Awesome! Very impressive. Never thought people will create a tools which let user set parameters directly in the URL (as oppose to drop list or radio button). Creative and clean. What more to say?


----------



## Cride5 (Jun 22, 2010)

I've just completed a major update to VisualCube.

New features:
* Algs now applicable to NxNxN cubes (and cTimer now does scramble images for 2x2 to 7x7)
* Much wider range of stage masks, with the ability to rotate them
* Style variables configurable via cookies. Thanks to Macky for his contribution to this feature.

Latest version @ http://cube.crider.co.uk/visualcube.php
.. source also updated on sourceforge.

Although some testing has been done, there may still be bugs. Let me know if you find any, cheers.


----------



## xbrandationx (Jun 22, 2010)

This is really cool ive been playing with it for hours now


----------



## StachuK1992 (Jun 22, 2010)

yay!
Lots of new masks! Nice.


----------



## Carrot (Jun 22, 2010)

Cride5 said:


> I've just completed a major update to VisualCube.
> 
> New features:
> * Algs now applicable to NxNxN cubes (and cTimer now does scramble images for 2x2 to 7x7)
> ...



I can't generate anything bigger than 10x10x10 :'(


----------



## Cride5 (Jun 22, 2010)

Odder said:


> Cride5 said:
> 
> 
> > I've just completed a major update to VisualCube.
> ...



I set that as a limit on my server to prevent visualcube from hogging processor cycles at the expense of other clients. If you download the source from sourceforge you can run your own visualcube server and raise the limit arbitrarily.


----------



## Cride5 (Jul 8, 2010)

*VisualCube Now Does Arrows*

This has been requested a fair bit, so I've decided to add it...

Example:



 visualcube.gif?alg=S2M2E2&arw=U0U2-s7,U2U8-s7,U8U0,R6R2R0-s8-i5-yellow


Currently permutation arrows need to be defined manually, but if I find the time I may implement a view option which allows them to be automatically drawn, based on cubie permutation...


----------



## Patiño (Jul 17, 2010)

Great stuff, Cride5! The cubes look really nice. What I'd love as the next feature is to be able to see the back and left layers (Something like this, only prettier)

Good job!


----------



## Cride5 (Jul 17, 2010)

Hi Patiño, nice idea ... I'll put it on the todo list.

I was also going to do a 'folded out' view as well - like this. These shouldn't be too hard to implement, it's just a case of finding some free time!

Cheers for the suggestion.


----------



## AndyK (Jul 19, 2010)

The arrows are sooo awesome! Thanks man.


----------



## StachuK1992 (Jul 19, 2010)

Cride5 said:


> Hi Patiño, nice idea ... I'll put it on the todo list.
> 
> I was also going to do a 'folded out' view as well - like this. These shouldn't be too hard to implement, it's just a case of finding some free time!
> 
> Cheers for the suggestion.


If you find that you pretty much have no spare time, and if you have something not too complicated on said to-do list, I'd probably have fun trying it out, all-the-while helping you out.

I was thinking of making a GUI.
Such that there would be textfields for
-alg/case
-color scheme
-size
-etc

Drop-down selections for
-format
-stage
-view
-puzzle
-etc

rather than just typing URLs over and over.

Basically, it would be a more advanced "chooser" than on my alg trainer, without timing.

Thoughts?

Cheers,
Stachu


----------



## Cride5 (Jul 19, 2010)

Stachuk1992 said:


> I was thinking of making a GUI.
> 
> Thoughts?
> 
> ...



Hi Stachu, yes that sounds like it would be useful. I would prefer to keep the VisualCube script separate from anything designed to make calls to it though. If you want to build an html page using javascript to set up script variables and generate images that would probably be ideal. Have a look at my cTimer app, to see examples of JavaScript-based calls to VisualCube.

Good luck!


----------



## StachuK1992 (Jul 19, 2010)

Cride5 said:


> Stachuk1992 said:
> 
> 
> > I was thinking of making a GUI.
> ...


I've already made calls to VisualCube 
In the link I posted - just click begin on it, and you'll see.

And I'll get working to it fairly soon.

Stachu


----------



## macky (Aug 4, 2010)

[edit]
This was a response to Sarah's deleted post. But maybe someone else will find it useful.
[/edit]

I thought this was my fault, but the mask is correct. You see that the two 'images' actually differ if you add a y2:





alg=y'FRUR'y'R'U'y2&stage=els




alg=y'FRUR'y'R'U'y2&stage=vh


So, tips:

(1) Make sure there's no net rotation in the sequence.
(2) Use 'case=' instead of 'alg='. The former displays the state that is solved by the sequence.

[edit]
So I think you want these:




case=URyRU'R'F'y'&stage=els




case=URyRU'R'F'y'&stage=vh


----------



## Sa967St (Aug 4, 2010)

macky said:


> I thought this was my fault, but the mask is correct. You see that the two 'images' actually differ if you add a y2:
> 
> 
> 
> ...


I deleted my post a few mins ago. I noticed it was doing that because I added a y2 in front of the alg to get green on F and orange on R. 




alg=FR'F'R&stage=vh&sch=yogwrb



alg=FR'F'R&stage=els&sch=yogwrb

problem solved =D


----------



## macky (Aug 4, 2010)

ah well still, use case= instead of alg=.


----------



## Sa967St (Aug 4, 2010)

macky said:


> ah well still, use case= instead of alg=.



Wow I'm dumb. I didn't notice that I could have just used case= instead of alg= then writing out the inverse. xD
Thanks =D


----------



## demma (Oct 26, 2010)

Congrats for this excelent script, is there a way to have the lastest code (0.5.2) in sourceforge?
Having some problems to render images in my server.

Thank you very much.

Edit: Which version of PHP do you use? In 5.2.9 the browser shows a broken image and in 5.3.0 it doesn't show anything.
Edit2: Tested in 5.0.0 and 4.3.9 and it doesn't work. Seems I have some problems with the characters because the browser changes the R' to R%27...
Edit3: Uploaded to two different servers and the same result. With cache enabled and dissabled.


----------



## Cride5 (Oct 29, 2010)

Hi, sorry for the delay replying ... quite busy these days.

The script should be able to handle escaped characters within URLs (like %27 instead of ').

Does your server have ImageMagic installed? Find out by typing> convert -version 
In order to render cubes properly you want a reacent-ish version. Something like 6.x or above.


----------



## demma (Oct 29, 2010)

Thanks for your reply, Cride5.
I'm running an Apache in Windows so I think the php extension for that is not avaiable yet.
I will generate my images in your server meanwhile.
Congratulations again, it's insane.


----------



## Zarxrax (Nov 7, 2010)

Would it be possible to make this NOT anti-alias the colors?


----------



## Lid (Jun 4, 2013)

Looks like the site is down now ("403 Forbidden error").


----------



## Cride5 (Jun 6, 2013)

It appears to be a server problem. I've raised the issue with my service provider, and hope it can be resolved soon.

Apologies for the service interruption.


----------



## Veerexx (Jun 6, 2013)

Cride5 said:


> It appears to be a server problem. I've raised the issue with my service provider, and hope it can be resolved soon.
> 
> Apologies for the service interruption.



I was looking forward to checking this out :3
I guess I will wait until it is back up 
If you want me to host it on: http://speedsolvingrecords.com for you, then sure


----------



## Cride5 (Jun 6, 2013)

Service is now back up as normal. Thanks for reporting the problem.

@Veerexx Anyone is free to host a VisualCube server, as long as the license terms are adhered to. The source code is available at https://sourceforge.net/projects/vcube


----------



## teller (Jun 6, 2013)

I rely heavily on your Alg Translator...if you had a bitcoin address on there I would surely send you a tip.


----------



## rudra (Jun 9, 2013)

Awesome. Thank you cride5


----------



## Lid (Jul 9, 2013)

Down again 

But you can always use the backup here, even thou it's an older version (v0.3.0 vs. v0.5.2)
For those that use algtrans you can use the wayback machine or kSim.


----------



## Lid (May 21, 2015)

Looks like the option "mc" is gone(?), any chance of fixing that?


----------



## PixelWizard (Jul 8, 2015)

Hey together,

Seems like the website which hosts Visualcube and the world-famous ZZ-Texttutorial is down.

*Why is this bad?*
- Big Cubing websites like algdb.net depend on it
- The content of the site was amazing

*Why is it down?*
- Not sure but my presentation is on the HN-Frontpage right now (https://news.ycombinator.com/item?id=9850914), which causes a lot of traffic to the site, since a lot of images are on the presentation.

Is there an alternative site which provides Visualcube-Images or does anybody knows further information?

Greetings
PixelWizard


----------



## StachuK1992 (Jul 8, 2015)

Use this temporarily

http://stachu.cubing.net/v/?r=x25y-25&stage=fl&bg=t&fmt=png

Relevantly, http://algdb.net is pretty much unusable right now. Oops, sorry.


----------



## PixelWizard (Jul 8, 2015)

StachuK1992 said:


> Use this temporarily
> 
> http://stachu.cubing.net/v/?r=x25y-25&stage=fl&bg=t&fmt=png
> 
> Relevantly, http://algdb.net is pretty much unusable right now. Oops, sorry.



Thanks man! But is it just me or does your link not work?


----------



## StachuK1992 (Jul 8, 2015)

PixelWizard said:


> Thanks man! But is it just me or does your link not work?


Works for me, but cubing.net may not be used to a lot of heavy traffic.
I fixed the homepage of algdb.net to use these images, and that works fine for me (albeit a bit slowly).

I have the PHP code. I'll see if I can host visualcube elsewhere really quick with more bandwidth.

EDIT:
I don't have time right now. http://stachu.cubing.net/v/?r=x25y-25&stage=fl&bg=t&fmt=png will have to work for now.


----------



## Christopher Mowla (Jul 8, 2015)

PixelWizard said:


> Is there an alternative site which provides Visualcube-Images or does anybody knows further information?


If you are just using visualcube for the last layer view, next time the site comes up, you _can_ save every image you use and add it to the archive of your website.

Did anyone save this website for offline viewing? The images are contained in the "_files" folder.

To generate last layer perspective images for the future, you can simply make a "paint user-friendly" version for each cube size and manually change the colors of the stickers. I did this for all last layer cube images on the 4x4x4 parity algorithms page. (You may use those images for the 4x4x4, if you want to.)

As you can also see on that page, images like this, I used the program CubeTwister.


----------



## cubizh (Jul 8, 2015)

Visualcube is a php script that allows the rendering of images.

Its code is open source, available (and recommended) for anyone to use, and all you need is access to an Apache web server with PHP and ImageMagick installed, and you can install the script it in like 1 minute: https://github.com/Cride5/visualcube

If anyone is to use it on a permanent or semi-permanent basis on their websites, other than create one image and save it, they should download the code and use it on their own websites, not point it to Conrad's website as that obviously creates a bandwidth problem to him if he receives a lot of calls and is a bit irresponsible to depend on a 3rd party like that.

So for all affected websites by crider.co.uk's offline status I say good riddance for their poor decisions/ignorance/unreliability.


----------



## AlexMaass (Jul 8, 2015)

try this https://web.archive.org/web/20140824055129/http://cube.crider.co.uk/


----------



## molarmanful (Jul 8, 2015)

What happened to get Conrad's website "account suspended"?

By the way, the code still seems to be hosted on Github, so we should be fine.


----------



## StachuK1992 (Jul 8, 2015)

cubizh said:


> So for all affected websites by crider.co.uk's offline status I say good riddance for their poor decisions/ignorance/unreliability.


Yeah, those guys are idiots!


----------



## Lid (Jul 8, 2015)

or you can just use speedsolvings setup: https://www.speedsolving.com/wiki/extensions/algdb/vcube/visualcube.php


----------



## Cride5 (Jul 9, 2015)

Due to bandwidth restrictions on my web host I've implemented a limit of 3 images per minute on the service hosted at cube.crider.co.uk/visualcube.php

If embedding images generated by the service above, consider pre-generating the image(s) and hosting them on your web-server or cloud storage.

Apologies for any inconvenience.


----------



## PixelWizard (Jul 10, 2015)

Cride5 said:


> Due to bandwidth restrictions on my web host I've implemented a limit of 3 images per minute on the service hosted at cube.crider.co.uk/visualcube.php
> 
> If embedding images generated by the service above, consider pre-generating the image(s) and hosting them on your web-server or cloud storage.
> 
> Apologies for any inconvenience.



You're tools are meant to be awesome and usable, not limited and (therefore) impractical.

The websites, who use visualcube, perform *multiple requests* for your images. Look at algdb as example, the STANDARD for looking up and learning new algs.

Though I understand your point, with the whole bandwidth restrictions.

*To exit this dilemma, I see two ways:*

*1. *Upgrade your hosting-plan and abbolish the limit. How much do you need for a better plan to grant a service like before the website crashed?

*2. *Instruct every user properly how to set up his own visualcube-host. Create a instruction-file with proper printscreens and good explanations. The point-after-point instructions on Github may cause problems (as they did, when I tried to install the host).


If one of this option sounds appliable, notify me, I'm sure there's a good way to solve the problem.

Greetings 
PixelWizard


----------



## Cride5 (Jul 10, 2015)

I've installed some real-time monitoring to better understand the situation. It appears that the service is currently receiving around 10 requests per minute, with bursts of around 100 per min. I've raised the limit to 10 requests every 2-minutes (per user). This should be sufficient for most needs.

The main use case that is blocked by this system is a gallery of cube images containing more than 10 cube images. To work around this I would encourage page authors to save generated images and host them with their own provider.




PixelWizard said:


> *1. *Upgrade your hosting-plan and abbolish the limit. How much do you need for a better plan to grant a service like before the website crashed?


Who is going to pay for the upgrade?



PixelWizard said:


> *2. *Instruct every user properly how to set up his own visualcube-host. Create a instruction-file with proper printscreens and good explanations. The point-after-point instructions on Github may cause problems (as they did, when I tried to install the host).


Unfortunately free time is in short supply these days. The readme instructions, along with the source are part of an open-source project which can be improved by anyone wishing to contribute.


Another solution for folks hosting image galleries would be to use the version deployed here on speedsolving.com. I expect the hosting is better set up for high volume traffic.


----------



## PixelWizard (Jul 10, 2015)

Cride5 said:


> I've installed some real-time monitoring to better understand the situation. It appears that the service is currently receiving around 10 requests per minute, with bursts of around 100 per min. I've raised the limit to 10 requests every 2-minutes (per user). This should be sufficient for most needs.



Most needs require more than 5 images per request. Such a low limit is unsufficient. What is the absolute top-limit for your bandwith? 5 images per minute are 75KB (avg image size) * 5 = 375KB --> 375KB/ 60s --> *6.25KB/s*. I doubt that you have such a low Bandwith... Even free hosters have significantly more.



Cride5 said:


> The main use case that is blocked by this system is a gallery of cube images containing more than 10 cube images. To work around this I would encourage page authors to save generated images and host them with their own provider.



This may apply to "smaller" website, with *non-dynamic* generated images, but imagine saving 1304 images for all cases on algdb locally. This would be an enormous amount of work.




Cride5 said:


> Who is going to pay for the upgrade?


Depends on the upgrade-cost.



Cride5 said:


> Unfortunately free time is in short supply these days. The readme instructions, along with the source are part of an open-source project which can be improved by anyone wishing to contribute.


Once I figured out how to get it to work, I'll possibly create a proper Installation-Guide :tu



Cride5 said:


> Another solution for folks hosting image galleries would be to use the version deployed here on speedsolving.com. I expect the hosting is better set up for high volume traffic.



I'll check it out  Thanks for the hint though!


----------



## StachuK1992 (Jul 10, 2015)

PixelWizard,

I get your point, but it's a bit inappropriate to feel so 'owed' by Conrad's service. He put something free out there, and it was (ab)used.
He certainly has no obligation to do *anything*.

Further, it's not really his job to solve my caching issue; I could certainly cache all of the images used by algdb some day 


Conrad,

I suspect that I'm mostly the cause of your issues. I apologize for that.
I really should have taken the time to get a local copy of visualcube running.

If you are considering the upgrade, please feel free to contact me at [email protected].
I've appreciated your software for a while and am willing to put a bit of money where my mouth is.

Another option would be for me to host vcube for you on Azure. I have essentially unlimited credits, and they support PHP just fine.


Unfortunately due to the GPL licensing, I'm very deterred from helping with the actual code, otherwise I'd try to help there, too! 
Any chance that this project could really be a MIT or similar license? Otherwise, I have been planning on entirely ditching vcube and creating my own library in the future.

Also, I suspect you may have a vested interested in alg databases, seeing as how you're the other algdb in my mind.
Later this month, my forever-promised upgrades are coming out, and I'd love to have algdb using vcube still at that point! 

Stachu


----------



## PixelWizard (Jul 10, 2015)

StachuK1992 said:


> PixelWizard,
> 
> I get your point, but it's a bit inappropriate to feel so 'owed' by Conrad's service. He put something free out there, and it was (ab)used.
> He certainly has no obligation to do *anything*.
> ...



Guess you're right. I'm sorry for that, Conrad :/ I was a little bit too harsh
No bad feelings 



StachuK1992 said:


> If you are considering the upgrade, please feel free to contact me at [email protected].
> I've appreciated your software for a while and am willing to put a bit of money where my mouth is.



I'd also contribute if necessary :tu



StachuK1992 said:


> Also, I suspect you may have a vested interested in alg databases, seeing as how you're the other algdb in my mind.
> Later this month, my forever-promised upgrades are coming out, and I'd love to have algdb using vcube still at that point!



I'm really excited for the update! Cool to see it coming out soon


----------



## Cride5 (Jul 10, 2015)

Stachu, VisualCube is licensed under *L*GPL which means that if you're using it as a library then your code can be licensed any way you like. For example, you could write your own alg database that uses VisualCube, and sell it commercially. You're free to also change, improve or fork VisualCube itself, but the restriction is that it must remain open source (LGPL).

In terms of hosting etc, I have absolutely no problem with people running VisualCube mirrors, or creating derived works. In fact I would encourage it. Unfortunately I find myself at a time of life where free time is at a premium so cannot invest the kind of time that I used to in open source projects.


----------



## StachuK1992 (Jul 10, 2015)

Conrad,


Thank you very much for taking the time to respond, and further for clearing up LGPL licensing for me.
GPL has always seemed like such cancer to me, but you make LGPL in particular a bit less scary. 


I will be playing with your code in the coming days, likely forking it on GitHub.


Further, I will host a copy of VisualCube for the general public to use at large.
I'll post a link once that's done.


Thank you,
Stachu


----------



## cubizh (Jul 10, 2015)

StachuK1992 said:


> Unfortunately due to the GPL licensing, I'm very deterred from helping with the actual code, otherwise I'd try to help there, too!
> Any chance that this project could really be a MIT or similar license? Otherwise, I have been planning on entirely ditching vcube and creating my own library in the future.


What exactly is wrong with the use of a GPL license that prevents you from wanting to help the actual code of something like a cube visualizer? 
What sounds like you're saying is disappointing in my view.


----------



## StachuK1992 (Jul 10, 2015)

My understanding of GPL may have been wrong.
I have no problems contributing to an open-source project.

I do have problems with a product being released as 'open source' but not being allowed to be used but either more-open or less-open sourced projects (projects released under MIT or on the other side, commercially)


----------



## Logiqx (Mar 6, 2016)

Cride5 said:


> Stachu, VisualCube is licensed under *L*GPL which means that if you're using it as a library then your code can be licensed any way you like. For example, you could write your own alg database that uses VisualCube, and sell it commercially. You're free to also change, improve or fork VisualCube itself, but the restriction is that it must remain open source (LGPL).
> 
> In terms of hosting etc, I have absolutely no problem with people running VisualCube mirrors, or creating derived works. In fact I would encourage it. Unfortunately I find myself at a time of life where free time is at a premium so cannot invest the kind of time that I used to in open source projects.



Hi Conrad. Thank you very much for creating VisualCube which I find incredibly useful!

After years of using the VisualCube website, I was unable to generate images at the weekend.

TL;DR - The ImageMagick step appears to be failing on your server and SVG is the only format that currently works.

Whilst installing / debugging VisualCube on my own web server(s), I also spotted a few minor glitches. I've created my own branch in GitHub, fixed the glitches and created a pull request.

Hopefully you'll pull them back into your master branch.


----------



## Cride5 (Mar 7, 2016)

Hi Logiqx, I've merged your changes. Thanks for the contribution.

The recent interruption to the service is because of a migration. I had to do this because of an un-expected change with the original provider. I'm currently moving the service to modulus.io. A basic service (with version 0.5.3) is now running, but there is currently no raster (png/gif) image generation and no caching. These will should be fixed by the end of the week.

The good news is that there are no bandwidth limits with the new host, so the throttling has been now been removed.


----------



## Logiqx (Mar 7, 2016)

Cride5 said:


> Hi Logiqx, I've merged your changes. Thanks for the contribution.
> 
> The recent interruption to the service is because of a migration. I had to do this because of an un-expected change with the original provider. I'm currently moving the service to modulus.io. A basic service (with version 0.5.3) is now running, but there is currently no raster (png/gif) image generation and no caching. These will should be fixed by the end of the week.
> 
> The good news is that there are no bandwidth limits with the new host, so the throttling has been now been removed.



Thanks. I'm glad to have helped out albeit in a small way.

Great to see you are still around and good news about the new server.


----------



## DELToS (Mar 12, 2017)

When I have the format as anything other than svg, the image doesn't show. Help?


----------



## Logiqx (Mar 12, 2017)

Try this one...

http://stachu.cubing.net/v/


----------



## pinser (Mar 12, 2017)

I have the same problem. I just screenshot the page and manually convert it to png


----------



## Logiqx (Mar 13, 2017)

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 (Jul 31, 2017)

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 (Jul 31, 2017)

It's not complicated, just add things to the URL.


----------



## McubeS (Jul 31, 2017)

TDM said:


> It's not complicated, just add things to the URL.


Could you show, or give a demonstration?


----------



## TDM (Jul 31, 2017)

McubeS said:


> 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:



Spoiler: Example 1









*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.





Spoiler: Example 2








*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).





Spoiler: Example 3








*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.


----------



## Tabe (Mar 6, 2018)

Does anyone know of a version of Visual Cube - or something similar - that will generate images for cuboids?


----------



## AndyK (Mar 9, 2018)

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:
http://cube.crider.co.uk/visualcube.php?fmt=svg&size=200&alg=S2M2E2


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


----------



## Lucas Garron (Mar 9, 2018)

AndyK said:


> 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:


```
// 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.


----------



## AndyK (Mar 9, 2018)

Lucas Garron said:


> Look in the source for the following:



Ahh, well that was easy enough. Bad form on my part that I missed that. Many thanks Lucas!


----------



## Jerry Li (Apr 11, 2018)

Hi!
I've been using VisualCube, and for some reason if I do the format like fmt=jpg, it doesn't show the image anymore. What I'm I doing wrong?

This is the code I cant make the format into a png or jpg format.
http://cube.crider.co.uk/visualcube...e=RU%27RURURU%27R%27U%27R2&arw=U3U7,U7U5,U5U3


----------



## Andrew Robbins (Apr 20, 2018)

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 (Jul 10, 2018)

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 (Jul 11, 2018)

XYZRyan123039 said:


> 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.


----------



## abunickabhi (Jul 27, 2018)

This software is amazing along with your other cube web apps , I have used it to make documentation of my new method!


----------



## Pyjam (Jul 27, 2018)

stachu site is dead, and cube.crider doesn't support the png format (why?!).

Hopefully some nice guys gave me alternate links a couple of days ago:
https://www.cubing.net/api/visualcube/
http://roudai.net/visualcube/


----------



## Adam Smith (Aug 21, 2018)

Good work, thanks.


----------

