News for hackers. Stuff that matters.
Re:Show HN: Metaballs by femto113 on Tuesday October 17, 2017 @02:30PM (#15493442)
Feels more organic to me if the original metaball gets smaller as the other one moves out (like its stealing material). Haven't worked out the correct math but a quick PoC is here:

https://codepen.io/femto113/pen/MEZava

Re:Show HN: Metaballs by fergyfresh on Tuesday October 17, 2017 @02:36PM (#15493509)
That is weirdly satisfying to watch...
Re:Show HN: Metaballs by Raphmedia on Tuesday October 17, 2017 @02:40PM (#15493556)
Would make a great loader icon.
Re:Show HN: Metaballs by XaspR8d on Tuesday October 17, 2017 @05:48PM (#15495269)
Keeping 100% accurate constant area would require a pretty insane closed form equation. Even ignoring the amount of area added by the stretched portions.
Re:Show HN: Metaballs by jakobegger on Wednesday October 18, 2017 @04:14AM (#15497626)
Yes, in this case a numeric approach would probably be the way to go:

- Assume that R1, R2 are the radii of the discs and A_ORIG is the original area (eg. R1^2 PI)

- Calculate the area A for a given R1, R2

- Multiply R1 and R2 with SQRT(A_ORIG / A)

- Repeat

If this doesn't converge after a few iterations, you can use the Newton method, or even a simple binary search to find he correct radii very quickly. A(k R1, k R2) should be monotonic for k, so solving it numerically for a given value should be trivial.

Re:Show HN: Metaballs by winkerVSbecks on Tuesday October 17, 2017 @03:43PM (#15494207)
That is awesome!