Here is an algorithm i had in mind for a long time, but no time to realise.

I had experienced blobs by using flash filters, but they use so much cpu that i thought about a way to do them with bezier curves.

The main idea is :

  • gather many points into blobs
  • find the hull (or perimeter) of each blob
  • draw the hull with bezier curves

The first difficulty was to find some piece of code that will build the hull (or perimeter) of a couple of points.

I found a java code here : http://www.cs.princeton.edu/~ah/alg_anim/version2/QuickHull.html

Once the code was adapted (you can see blobs points linked by black lines in exmaple), i worked on a way to render the hull with bezier points.

I found a trick to create a larger hull built of many points that will be used for the bezier curves. The result is not as fine as i thought but i guess it's ok.

So here is an example which consists of 50 points :

Source are availables here

sorry not so much comments in code, but i think the whole thing is a bit hard. I may isolate the hull algorithm is some of you are interested in.