Shows a scalar field f(x,y) with animated contour lines (level sets). A movable sample point displays the gradient vector ∇f as the direction of steepest ascent, a tangent segment to the nearby contour (demonstrating ∇f ⟂ level sets), and a rotating unit direction u to illustrate the directional derivative D_u f = ∇f·u via a live dot-product bar.
Contours are approximated by sampling a grid and drawing crossing segments per level (marching-squares style). The sample point is pointer-controlled when available; otherwise it follows a smooth loop. All geometry is snapped to a small pixel grid for a retro blocky aesthetic; animations are time-based (2–4s cycles).