Lab
Heat Diffusion Painter
Paint hot spots, ice cubes, and walls on a grid and watch the heat equation spread temperature in real time.
Splat hot stuff and watch it cool down
Preset scenes
Brush
Shape & edges
An insulated edge keeps heat in; a cold edge drains it away. Click an edge to toggle it.
Canvas
Drag to paint. Try mixing hot spots, ice cubes, and walls, see how the temperature flows around your obstacles.
What's actually happening?
Heat flows from hot to cold
Every pixel is a little block of metal. Each step, every block looks at its four neighbors and trades a tiny bit of temperature with them so things even out. Hot spots cool down because they give heat to cooler neighbors; cold spots warm up for the opposite reason.
The equation behind it
The rule is the heat equation: ∂u/∂t = α ∇²u. In plain English: how fast a point's temperature changes equals how much its neighbors disagree with it, times a constant α (how good the material is at conducting). Same math runs in CPUs, ovens, climate models, and skin.
Edges change everything
An insulated edge keeps all the heat in, it just spreads out and evens off. A cold edge drains heat away until everything goes cold. On a square plate you can set each edge on its own; on a round plate the whole rim is one edge. Same hot dot, different edges, totally different endings.
Walls and Fourier's gift
Walls completely block flow, heat has to go around. Jean Fourier invented this whole framework in 1822 to study how heat moves through metal. The Fourier transform, same Fourier as the epicycles lab — came out of him needing to solve the heat equation.
Challenge 1: Cool down a hot plate
Scenario: Pick the Hot dot preset. Under Shape & edges, click each edge so all four turn blue (Cold).
Observe: The hot spot spreads outward, then the whole plate slowly turns blue as heat leaks through the cold edges. Now click the edges back to amber (Insulated), the heat stays in forever, just smoothing out.
Same starting state, two boundary conditions, two completely different steady states. That's the power of BCs in PDEs.
Challenge 1b: One cold edge makes heat lean
Scenario: Hot dot preset, square plate. Set just the right edge to Cold and leave the other three Insulated.
Observe: The blob doesn't cool evenly, it slides toward the cold edge, leaving a slanted temperature ramp across the plate. Heat always flows toward the cold.
Then switch to the Round plate. Now the rim is a single edge, so a hot center cools in perfect rings instead of leaning one way.
Challenge 2: Build a heat maze
Scenario: Click Clear. Switch the brush to Wall and draw a snaking corridor. Switch to Hot and paint one end. Switch to Cold and paint the other end.
Observe: Heat travels through the corridor, hitting the cold end, instead of cutting straight across. The more twisted your maze, the longer the wait.
This is exactly how thermal management on a chip works, the silicon equivalent of your maze decides whether your CPU melts.
Challenge 3: Find equilibrium with the Walled rooms
Scenario: Pick the Walled rooms preset. Notice the small gap in the middle wall.
Task: Predict what the temperature gradient will look like once it stops changing. Then crank Time speed to 20 and wait. Was your prediction right?
The two rooms eventually equilibrate through the gap, but the gradient across the gap is far steeper than anywhere else in the grid. Steepness of gradient = rate of flow.
Security model
Everything runs in your browser. No data is sent anywhere. The heat equation solver, colormap rendering, and pointer-paint interactions all execute locally in JavaScript on your device.