Where the flow stands still — sampleGrad as a Jacobian, not a colour

The points where u = 0 are the skeleton of a flow: everything else is organised around them. Finding them needs Newton's method, Newton needs the Jacobian, and the Jacobian is exactly what sampleGrad returns — so this page uses the 1.11.0 gradient for something other than shading. Each zero is then classified by the eigenvalues of ∇u there, and the curves running out along its real eigenvectors are drawn.

One fact falls out immediately, and it is not a coincidence of this seed: every zero is a saddle. Incompressibility means tr ∇u = 0, so λ₁+λ₂+λ₃ = 0 and the eigenvalues can never be all-negative or all-positive — a divergence-free flow has no sources and no sinks, anywhere, ever. Nothing is created and nothing drains away. Switch to compressible control for the paired opposite: a written-out gradient field u = ∇φ with φ = −cos x − cos y − cos z, in the same box, where genuine sources and sinks appear and the trace reading jumps off zero. Without that half, "the trace is 0" would only be a measurement of a degenerate configuration.

The second readout audits the search itself, by a method that does not use the search: the Kronecker degree of û over the faces of a movable audit box, by surface quadrature, must equal the sum of the indices sign det ∇u of the zeros Newton found inside it. It has to be a sub-box: over the whole periodic cell the total index is forced to zero by Poincaré–Hopf, so agreement there would be guaranteed no matter what the search did. The raw quadrature value is printed unrounded next to that integer. When they disagree, the page says the search missed something — the theorem is used to test the algorithm, which is the only honest direction to run it. Drag to orbit.

helix-noise · critical points
solving…
audit box
saddle (index +1) saddle (index −1) source / sink — impossible when div u = 0
loading three.js…