Mycellium Source Code Available
Last time [LINK] I discussed how virtual Worms could “eat” a picture, seeking out the lighter or darker areas as food and leaving a trail in their wake. I’ve dumped the source here: http://francisshanahan.com/demos/worms/test.html so you can interact, create your own images and figure out how it’s done. To be honest I haven’t had much time to clean this up as I’ve been focusing on other things and doing a bit of travel for work so be gentle.
Just enter a URL of an image and click “create drawing” to being. The page will load that image into a hidden canvas and use it as reference to draw the picture. You should use Chrome of course but this should work in all HTML5 compatible browsers.
Room for improvement might be to place the code in an enclosure, cleaning up the global DOM namespace or multi-thread it this using Web Workers although the current speed is acceptable. Web Workers in this instance might be overkill.
Enjoy.









Do you think it would be possible to create a live interactive version of this? I’m thinking along the lines of: Someone visits a page, and starts the program, their webcam activates and a live video portrait of them is displayed in this style, perhaps actively being created in this style.
@Joseph, it might be tough to do that, especially since most browsers don’t support accessing the webcam (yet). I have managed to do video capture through javascript and there is already a post on this site about that but only with an experimental build of Opera. Maybe in the future…