the level-set method
How do you track the shape of a spreading wildfire, a growing crystal, a moving flame front, or the boundary between two fluids — especially when the shape can split in two or merge, which a list of points on the curve handles very badly? The level-set method is an elegant PDE-based answer: instead of tracking the moving curve directly, you store it as the zero contour of a function defined over the whole space, and move the function.
The trick is to represent the interface as the zero level set of a function phi(x, t): the front is wherever phi = 0, with phi positive on one side and negative on the other. If the interface moves with a normal speed F, then phi must satisfy the level-set equation phi_t + F |grad phi| = 0 — a Hamilton-Jacobi-type PDE. You solve this for phi over a fixed grid, and read off the moving front at every instant as the place where phi crosses zero. The beauty is that topology takes care of itself: if two pieces of the front collide and merge, or one pinches into two, the function phi changes smoothly and the zero contour just does the right thing — no special surgery on a list of marker points is needed.
This made level sets the workhorse of moving-interface problems: simulating fluids with free surfaces (water splashing), crystal growth and solidification, image segmentation (a curve that flows to wrap around an object), and shape optimization. When the speed F is the curvature, the equation becomes mean-curvature flow, a parabolic shrinking; when F is constant, it is the eikonal/front-propagation equation. The honest cost is that you have raised a curve-tracking problem in one fewer dimension into a PDE over the whole domain, which is more expensive — and the function phi must occasionally be reset (reinitialized) to stay numerically well-behaved.
Two oil droplets in water, each represented as a region where phi < 0, drift together and merge. With a marker-point representation you would have to detect the collision and surgically join the two point-lists. With level sets you do nothing special: the two negative regions of phi simply grow into one, and the zero contour automatically becomes a single merged boundary.
Track an interface as the zero set of phi; topology changes handle themselves.
Level sets trade dimension for robustness: you solve a PDE on the whole grid to move a lower-dimensional surface, which is heavier and needs periodic reinitialization of phi to a signed-distance function. It is not free elegance — it buys topological flexibility with extra computation.