Lurker News

Comments (93) 36 threads

Earlier comments
Const-me1 reply#
The math can be optimized by at least an order of magnitude.

Trigonometry functions are expensive, especially the reverse ones.
If v=0.5, see [1] for how to find out sine/cosine of a maxSpread * v. For angleBetweenCenters + maxSpread * v, see [2] for how to find sine + cosine of a sum of angles.
If you’ll do all that math in the symbolic form (you can use Maple or Mathematica or something similar), you’ll get the equivalent formulae for p1-p4 that won’t use any trigonometry, only simple math and probably a square root.
[1] https://en.wikipedia.org/wiki/List_of_trigonometric_identiti... [2] https://en.wikipedia.org/wiki/List_of_trigonometric_identiti...

santaclaus3 replies#
> Metaballs, not to be confused with meatballs

I once reviewed an academic paper at a major CS conference that misspelled metaballs as meatballs throughout.

philipov#
You think that was a mistake?
dguaraglia#
After years of living in the US, I still have trouble that the word is "cockpit" not "cocktip". That became hilariously obvious when at work we had to use a library that uses the term "cockpit" for one of its main components.
ninju#
And the importance (oh...I see what you did there...well played)
mileycyrusXOXO#
I just started learning GLSL shaders. As practice, I wrote a psuedo-metaball joystick. I didn't know about metaballs, but now that I do I can do some more research and improve my next iteration.

Touch blob joystick shader: https://www.shadertoy.com/view/4lfcRf

spitfire1 reply#
https://www.youtube.com/watch?v=L_lD7iqG8nA

About 2 minutes in there's an excellent realtime metaballs implementation that ran smoothly on a 486-66mhz. Metaballs were an extremely popular effect in the early 90's.

Load more comments