Interactive Cross Field

Constrain crosses and watch the field respond

← Back to Gallery

Click crosses to constrain them. Click a constrained cross to release it. Drag to constrain many at once.

Grid
Constraints
Smoothing
Streamlines

How it works

  • Constraint modes:
    • Follow mouse — constrained crosses continuously point toward your cursor.
    • Auto orbit — a virtual point orbits the canvas and constrained crosses track it automatically. Adjust the speed slider to control how fast it moves.
    • Fixed angle — all constrained crosses lock to a single angle you choose with the slider.
  • Constrain boundary toggles all edge crosses as constrained, aligned to their nearest boundary edge (horizontal on top/bottom, vertical on left/right). These stay fixed even in orbit/follow modes — only interior constrained crosses move.
  • Smoothing iterations controls how many Laplacian relaxation passes run per frame. Low values (1-5) give a soft local effect; high values (50-100) propagate constraints across the whole field.
  • Continuous runs the smoother every animation frame, so the field progressively relaxes in real time. You can watch it converge — constrain a few crosses, enable continuous, and see the field settle into a smooth state over time.
  • The smoothing uses 4-symmetry averaging (cos 4θ, sin 4θ) to respect the cross’s rotational symmetry — the same representation used in the paper’s frame field optimization.
  • Streamlines trace curves that follow the cross field directions. At each point, the angle is interpolated bilinearly in the (cos 4θ, sin 4θ) representation, and both cross directions (0° and 90°) are traced to show the two families of isolines. Adjust density (seed spacing) and length (number of integration steps).