Processing sample: Esfera mod by spxl 12 August, 2008 at 8:04 pm
![]()
Esfera_mod_by_spxl, based on Esfera by David Pena. (source code)
subpixels.com goes 3D… realtime 3D, that is!
Processing.org released a new version of Processing over the weekend. I’ve downloaded a copy, fired it up, and had a play with one of the OpenGL samples that comes with it. I’m not a Processing guru just yet, so just made some minor changes, tried to tidy up some redundant code, and added some comments (as to what I think is going on!). I noticed it took a little while to upload the applet, and see that the applet folder has about 1.75MB of contents… The vast majority of this is OpenGL libraries for Java, so I might in future see what I can do about linking to a central repository for these instead of having a copy for each Processing sketch.
Note that this applet should be using native OpenGL for Windows, Mac, or Linux, so even though there are 1200 “hairs” in the animation, it should run fairly smoothly if you have a 3D graphics card. It runs well on my laptop (PC with an ATI Mobility Radeon 9700, a good three or so years old).
This entry is mainly a test for posting sketches online. It would be nice to have some way to embed a sketch into the blog with a placeholder image that is replaced by the sketch when clicked on… maybe I can find someone who has done this already to save too much hassle in figuring out how to do it!
-G.
Hi
first off, love the sketch. I am looking for a dead simple way to post my sketches on a blog. For the image above, are you doing a screengrab and then cleaning it up? Is there a ‘tool’ out there for grabbing one without the tedium of either adding code to the sketch itself or having to go into photoshop and crop out all the unwanted stuff?
what’s your workflow?
Hi Gabriel. I started typing a response here and got way too carried away with a comment that really needed some formatting. See my response in a new post: Go with the flow.
Short answer: I used IrfanView to grab a screenshot of the running sketch, cropped and saved the image “by hand” (still in IrfavView), uploaded the screenshot and all the files dumped in the “applet” folder (by the “Export” function in the Processing Development Environment) via FTP to my webserver and inserted the image link into a blog entry the same as I might insert an image link to anything else, only using the pre-determined URL of the screenshot image in the place where I FTP’d it to (as opposed to uploading a copy of the screenshot within the blog environment).
Cheers,
G.