Back

Divergence and curl of a 2D vector field

What you are seeing: a parameterized 2D vector field drawn as a grid of arrows. The two numerical readouts are the divergence and curl evaluated at the center of the plot (or at any chosen point - here the origin). Four field families are available: radial source (uniform divergence, zero curl), uniform rotation (zero divergence, uniform curl), shear (zero divergence, constant negative curl), and saddle (both zero everywhere).

The scalar parameter aa scales each family uniformly. For the source family, F=2a\nabla \cdot \mathbf{F} = 2a is independent of position; for the rotation family, ×F=2a\nabla \times \mathbf{F} = 2a is similarly uniform. Watching the arrows reorganize as you slide aa makes the differential operators visceral.

Figure 1. Divergence and curl of a parameterized 2D vector field. Method: analytic derivatives; finite-difference cross-check in the invariants test.
family rotation
a1.00

WHAT TO TRY

  • Vary each control and watch the rail readouts respond.
  • Compare the diagnostic plot against the live scene.