4 ms·
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
by femto113 9y ago
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 https://codepen.io/femto113/pen/MEZava
- fergyfresh 9y agoThat is weirdly satisfying to watch...
- Raphmedia 9y agoWould make a great loader icon.
- winkerVSbecks 9y agoThat is awesome!
- XaspR8d 9y agoKeeping 100% accurate constant area would require a pretty insane closed form equation. Even ignoring the amount of area added by the stretched portions.
- jakobegger 9y agoYes, 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.
- 11235813213455 9y agoCan't we use element.animate API for this? it should be smoother