Hi all,
With the help of various code snippets from this forum, I have managed to create a working metaball simulaton. I used a threshhold to get a clean border between the metaballs and the background.
Now, I would like to draw just the outlines of the metaballs. I tried using a min. and max. treshholds to achieve this, and allthough the result (shown below) does show something aking to an outline, it's still not quite what I am looking for. Especially the thicker parts of the line is what I want to get rid of.
As far as I understand it, the above image doesn't actually contain any lines, but just neighbouring white pixels which give the impression of a line.
I am thinking that it should be possible to find coordinates on these "outlines" and use them to create a bézier curve, wich would then creat a clean, continuously thick line around the metaballs. The problem: I have no idea how to start doing this.
Is this actually possible?
Am I overthinking this using metaballs and there is in fact a better solution?
Does this have something to do with blob-detection?
I'm not trying to create moving metaballs. I just want to draw the metaballs once and then create the clean outlines. So performance isn't an issue for once.
If anybody has any pointers, I'd be thankful.
2