Posted: January 3rd, 2009 | Author: John del Rosario | Filed under: AS 3.0, Experiments, Programming and Development | Tags: AS3, Experiments | 1 Comment »
Still delving into metaballs. I implemented the suggestions in this page for optimizing, and the results are good. I could even animate it – just barely though, at ~15 FPS on my browser.
Again, most of this is just copy & paste from the source provided in the tutorial.
Metaballs – move your mouse around. Click to change the target ball.
Still looking for a more elegant solution for Flash. This is done on a very small stage size, with only 4 balls. I want to do a full screen version, with at least 10 balls moving around.
Posted: January 2nd, 2009 | Author: John del Rosario | Filed under: AS 3.0, Experiments, Programming and Development | Tags: Experiments | 1 Comment »
I stumbled upon Metaballs yesterday, and decided it would be cool to try it out. I’ve seen some very nice examples done in Flash, but no luck finding their sources.
After Googling around, I found this tutorial on Metaballs and computer graphics.
I ported the code into AS3, but the result is not very impressive. It is very slow and processor heavy. If you click on the stage, the last Metaball added will be moved, and as you can see, it takes a bit of time to redraw them. I’m not even thinking about animating this.

I’m still looking for a more elegant solution for Flash, hopefully one that uses the Vector-based drawing API of Flash, and not BitmapData.
UPDATE: I have an updated version here. Also, I linked the image above to the updated one. For comparison, the old one is here.