Skip to content

Curl

Differential operator — takes a scalarField or vectorField and outputs the opposite kind, containing the curl of the input. Generalises Noise's built-in Curl mode to any field source.

Category: Math Menu path: Math > Curl

Ports

PortTypeDirectionDescription
field_inscalarField or vectorFieldinputInput field. Port type shown is scalarField, but vector inputs connect just as well
scalarFieldscalarFieldoutputActive when input is a vectorField. Scalar curl ∂v/∂x − ∂u/∂y
vectorFieldvectorFieldoutputActive when input is a scalarField. Rotated gradient (−∂s/∂y, ∂s/∂x)

Only one output is populated at a time — the one that matches the input's opposite type.

Parameters

ParamTypeDefaultDescription
stepscalar1.0Finite-difference step in comp pixels. Larger = smoother curl, smaller = captures sharper gradients at the cost of numerical noise

How It Works

In 2D, curl has two forms depending on input rank:

Scalar → Vector: the curl of a scalar s(x, y) is the 90° rotation of its gradient:

curl(s) = (−∂s/∂y,  ∂s/∂x)

This produces a divergence-free flow that circulates around the scalar's level curves (contours of equal value). Feeding a bumpy scalar field through Curl into PointAdvect gives particles that orbit the peaks.

Vector → Scalar: the 2D scalar curl of a vector (u, v):

curl(u, v) = ∂v/∂x − ∂u/∂y

Measures how much the vector field is rotating at each sample. Zero for irrotational (curl-free) fields like pure radial attractors; non-zero for swirling flows like Vortex.

Both forms use central finite differences with the step parameter; upstream sampling respects whatever CoordMap the input field uses.

Usage Examples

Basic: Divergence-free flow from scalar noise

Noise.scalarField → Curl → PointAdvect → DrawPoints. The curl of smooth noise produces a flow field that preserves particle density — unlike straight gradient advection, points don't clump at peaks or drain from valleys.

Basic: Rotation measurement

Vortex.vectorField → Curl → DrawField (visualization mode). Scalar output is uniform and non-zero — confirms the vortex is pure rotation.

Creative: Hybrid flow

Sum a Noise.scalarField → Curl (turbulent swirls) with a RadialForce.vectorField (inward pull) via FieldMath Add, feed to PointAdvect. Particles spiral inward with turbulent character.

Tips

  • Curl has no amplitude param — output magnitude is the input field's gradient. For smoothly-varying scalars (Noise, low-frequency Gradient) this gradient is small and the resulting flow is subtle. Expect to raise PointAdvect.speed considerably (e.g. 1000–5000) for visible motion, especially with Noise inputs. Fields with sharper structure (DistanceField, Voronoi, high-contrast Gradient) produce stronger curl and need less speed boost. Alternatively, pipe through FieldMath (Multiply) with a scalar constant to scale the vector field directly.
  • Curl commutes with addition: Curl(A + B) = Curl(A) + Curl(B). Useful for decomposing rotations in complex fields.
  • If the output looks noisy, raise step — you're probably sampling at sub-pixel scale where finite-difference error dominates the signal.
  • Curl(Constant) is zero — irrotational fields are curl-free by definition. This is a useful sanity check when wiring a graph.
  • The opposite operator (divergence) isn't currently a node, but div(vector) = ∂u/∂x + ∂v/∂y could be added with the same pattern if needed.
  • NoisenoiseType = Curl is a built-in shortcut for Curl(Noise.scalarField) with Perlin input
  • Vortex — pure rotation; its curl is a constant scalar
  • RadialForce — pure divergence; its curl is zero
  • FieldMath — combine curled fields with other field sources

Caddis — professional motion design.