giving something back to the Flash community

Processing – debut

Tags: , , , , ,

I started toying around with Processing for the past week.
I did this mostly to be ready to attend the Processing Paris #2 workshops.
I spent yesterday afternoon polishing the demo and here is the result.

First off, I have to thank Mark Webster ( aka tisane_01) – and the other organizers- for the event itself and moreover for being someone good.
Actually the good thing was that every person I talked to during the event was interesting, curious, smart, nerdy and alcoholic.
in a word perfect people :)

I followed V3GA‘s workshop, was really nice, he’s a good teacher and a skilled coder.

last weeek I ported my geometric tools (biga), as an exercise to get used to code in eclipse and in java.
it was not really difficult to swap ; the syntax is almost the same, just the types (double, int, float, long) thing was really a pain, having to cast almost everything all the time. btw processing works with floats which is somewhat puzzling.

the good thing with processing is that numerous talented people create and share the tools, on average, the quality of those APIs is very high, at least the code is clean and reliable.
in the world of Flash, many people (like me) are self tought and release crappy flash libs, buggy and not documented.

as mentioned above, it took me less than 4 minutes to abandon the Processing IDE for eclipse. I followed this tutorial which was really helpful ; not being familiar with eclipse, it really helped me get started.

another bothering issue was “how can I export my processing Applet through eclipse?”
after some intense browsing I found this proclipsing tool that just does the thing smoothly. there is a problem though ; exporting from eclipse will embed all the packages used by the project ie the whole JRE lib resulting in a 30Mo applet which is not that web-friendly.
there has to be a way to make a lighter version, I’ll post it if I find it.

so instead of showing the actual applet I did during the workshops, I did a screencast.
it’s pretty slow (3m14), sorry for that, the different transformations are binded to the keyboard, not to the sliders so when the mouse is stuck somewhere, it means that I change something manually. feel free to scrub ^^’

(@makc) I’ve put some soundtrack this time, they’re called Kap Bambino and they rock :)
maybe not the best choice… you can turn the sound off…

the source pictures look like this:

they’re from my FOTB elevator pitch, the binary one is used to create the meshes and thet colored one is used to collect … colors.

first there’s a blob detection pass, I used v3ga’s library, clean, works. then I get the vectorized outlines, I add a couple of points inside the shapes, then triangulate the different patches thanks to this library.

then I use my own private lib to render the triangles in various ways displaying the incircle or a (quick and dirty) voronoi diagramm for instance. the thing is still awfully buggy but it was fun and it’s not bad for a first app.

here’s a couple extra images

here are the sources for the applet, I don’t really know if it will work out. chances are you’ll have to rebuild a project and change things a bit but theoretically, it should work. it includes the processing version of my geom lib.

that’s it for now, I’ll keep exploring what can be done with it so the next posts will obviously talk about processing :)

Tags: , , , , ,

© 2009 HIDIHO!. All Rights Reserved.

This blog is powered by Wordpress and Magatheme by Bryan Helmig.