Visualizes a tiny program trace (mul → sin → add) as a computational graph and shows how automatic differentiation applies the chain rule by composing local Jacobians. The animation alternates between forward-mode (pushing value+tangent left-to-right) and reverse-mode (pulling adjoints right-to-left) to highlight their different propagation directions and cost scaling.
Single self-contained Canvas2D draw function. Uses a 4–8px snapped grid for a retro blocky look, GREEN/GREEN_DIM on black, and a 4.2s cycle that alternates forward and reverse sweeps with cubic easing (ease). The visualization is symbolic (local Jacobians labeled) to emphasize chain-rule composition over numeric evaluation.