Presets
Playback
Balls
How many balls and how big.
Field
Iso threshold and kernel shape.
Motion
Speed, lava-lamp buoyancy, swirl and drag.
Camera
Layers
Quality
Model checks
The science
What a metaball is
Each ball i has a centre c_i and radius r_i and contributes a smooth bump to a scalar field. The visible shape is the iso-set F(p) = sum_i k(|p - c_i| / r_i) = T. This page offers two kernels. The classic inverse-square kernel is k(u) = 1/u^2, so a lone ball has its contour at distance r / sqrt(T). The Gaussian kernel is k(u) = exp(1 - u^2) and gives a lone-ball contour at r sqrt(1 + ln(1/T)). Because the field is a sum, neighbouring bumps add and the contour bulges towards the other ball: that is why blobs seem to attract and fuse.
When two blobs merge
Two equal balls on a line are joined as long as the field at the midpoint (the saddle of F) is at least T. The midpoint is at distance d/2 from both centres, so for the inverse-square kernel 2 r^2 / (d/2)^2 = 8 r^2 / d^2 = T gives the critical separation d_c = r sqrt(8/T); for the Gaussian kernel d_c = 2 r sqrt(1 + ln(2/T)). Raising T shrinks every blob and lowers d_c. For unequal radii or many balls the saddle has no closed form, so the page reports the field at the midpoint of the closest pair instead.
How the page measures things
F is sampled on a 160 by 100 grid. The contour is traced with marching squares (linear interpolation along each cell edge), the inside area is the number of grid points with F at least T times the cell area, and blobs are counted by flood fill. The three checks compare these numerical results with closed forms (lone-ball area and perimeter, the merge separation found by bisection on the grid, and the analytic field gradient against a central difference).
Honest simplifications
The motion is not a fluid: balls move ballistically, with an optional temperature-like buoyancy (warm at the bottom, cooled at the top) and swirl, so the lava-lamp preset only imitates a real wax lamp, whose blobs obey heat transfer and surface tension. The area and perimeter numbers have the grid resolution (about 1 percent). In 3D the landscape height is the monotone squash 1.5 tanh(F/2.4) so the field singularities stay readable; the iso-plane sits at the same squash of T, so blob outlines are exact.
What to try
- Drag one ball slowly towards another and watch the blob count fall when the neck field passes T; compare with the purple curve and the readout "Neck field / T".
- Raise the threshold T: the blobs shrink and the merge gap d_c drops as 1/sqrt(T).
- Switch to the Gaussian kernel and see softer, rounder fusion with a different d_c formula.
- Use the lava-lamp preset and follow the number of blobs over time on the second graph.
- Open the 3D twin and look at how every blob is a hill that pokes through the cyan plane.