Smcameron's curly vortex
I missed out on the April Recreational Programming Group because I was at PyCon. He presented on a really cool texture genreator. It’s written in Processing so I decided to see how easy it is to run it using processing.js. TL;DR - Really easy.
The only necessary change I had to make to the code was to add a note to preload the image. Normally processing will execute assuming that the image file is local, but the DOM hasn’t yet loaded the image. To do this you just add a comment to preload the image:
/* @pjs preload="13940260644_7fe66ea59c_c.jpg" */; String source_image_file = "13940260644_7fe66ea59c_c.jpg"; int xdim = 300;//1400; int ydim = 300;//700; int nparticles = 50000;
Also I added a button for freezing the image so that you can easily save the image. I might eventually create a txrxlabs.org subdomain for hosting this and other projects, but for now this is all I’m doing: