I have an array of points (balls) in a 2D space that I want to display as 2D metaballs.
For training purposes, I implemented it on canvas
- create an array that represents each pixel
- iterate through this array and set the value depending on the distance to each ball for each pixel
- repeat and delete all below the threshold again
This works fine, but very slow, as expected. I am new to OpenGL and played with various patterns, but I was not able to make 2D OpenGL Metaballs. The current state is that I have a working view of my balls, drawing a sprite for each ball (using cocos2d-android-1, if that matters).
Can you provide me with a few (newbies) steps that I need to take?
source share