N = 4000 agents drift on a sinusoidal manifold embedded in the torus [0,1]². Each agent feels a restoring force toward the curve y = 0.5 + A·sin(2πx), a swirl acceleration about the centre, viscous drag, and stochastic noise.
Math: The signed manifold coordinate m = y − (0.5 + A sin 2πx) acts as a Lyapunov-like penalty; the normal restoring force collapses trajectories onto the manifold while the swirl term sustains perpetual circulation. Energy E = ½Σ|v|² and mean |m| quantify how tightly the swarm tracks the manifold.