2

I have an array of points (balls) in 2D-space which I want to be displayed as 2D Metaballs.

For learning purposes I implemented it on a canvas by

  1. create an array which represents each pixel
  2. iterate through this array and set a value depending on the distance to every ball for each pixel
  3. iterate again and remove everything below a threshold

That works fine but is extremely slow, as expected. I am pretty new to OpenGL and played around with various samples but I did not manage to make 2D OpenGL Metaballs. Current state is that I have a working representation of my balls by drawing a sprite for each ball (using cocos2d-android-1 if that matters).

Can you provide me some (newbie friendly) steps I need to take?

genpfault
  • 51,148
  • 11
  • 85
  • 139
ShadowMare
  • 2,087
  • 2
  • 25
  • 27

0 Answers0