This is just the pretaste of what this project will be — and I don’t really know what this project will be. I just want to share my love of the universe, and everything that surrounds us: the rules, the laws, the physics. All I really care about is just exploring and having fun. And I want to share it with others, and I want to document it, and I want to open source it.

And that’s pretty much it. Enjoy the first story.

Sam

Fire, from two numbers up

Five reels, each one computed in this browser as you read it: a speed and a direction, a box of molecules that collide, the runaway where heat begins making more heat, and a flame whose colour is worked out from its temperature rather than chosen.

00 Two numbers. The arrow is optional.

drag it — throw it

The same two numbers, drawn three ways. An arrow is only one picture of them, and it is the picture that suits a speed and a direction — which is the pair reel 01 is about to hand to a hundred and ten molecules. Two numbers can also be a point on a map, a colour, a price. Seven hundred numbers can be the meaning of a word. Nothing about a vector is arrow-shaped.
420m/sspeed
°direction
0wall bounces
the maths

x ← x + vx Δt  ·  y ← y + vy Δt

Every frame, each number is added to the matching position. A wall flips the sign of one of them and touches nothing else — which is why the speed readout does not move when it bounces.

SIMULATED the whole of it. APPROXIMATED nothing yet. NO PERSON HERE — the modern vector was assembled over decades by many hands and this page will not hand it to one of them for a tidier story. The reels below each have someone.

01 A hundred and ten of them. Temperature is the average.

drag your finger through them

warm

Every collision is worked out, one pair at a time, fourteen times per frame. Push them anywhere and they answer. There is nothing to play back.

Slow it right down and turn the arrows on. Then squeeze the box until they lock — crowding is the only thing that will ever freeze these. And drag the cold end past zero: the slider is allowed to go where the physics is not.

300Ktemperature, measured
422m/saverage speed
110molecules
2×10¹⁰×slowed down
0.03floor covered
0.00hexagonal order
15.4 × 8.3nmthe box, actual size
0.97m/squantum floor, this box
how many move at each speed  ·  bars counted from the box  ·  line predicted from the temperature alone
is this ice? — four questions, answered

are we actually freezing them, completely?

No — not by cooling, and never completely.

Cooling this box will not freeze it however far down you take the slider, and that is not a limitation of the simulation. These are hard discs: they refuse to overlap and they attract each other in no way at all. Cold is what stops molecules escaping from an attraction. With no attraction there is nothing for cold to do, so the discs get slower and slower and stay exactly as disordered as they were.

What does freeze them is crowding. Squeeze the box and past a certain density a regular lattice gives every disc more room to rattle in than a jumble does, so the box orders itself for the sake of entropy — with nothing pulling anything together. Press FREEZE IT, watch hexagonal order climb from near zero towards one, and then drag the box size back up and watch it melt. That number is the answer to "is it ice", and it is a measurement, not an opinion.

Even frozen they are not still. A crystal is molecules rattling in place about fixed positions; the lattice is the average, not the instant. Take the temperature to zero and they do stop dead — but see the next question for what that costs.

what is the physical floor of molecular speed?

Not zero. In this box it is about 0.97 m/s, which is 1.6 millikelvin — and that floor moves when you move the box size.

A molecule shut inside a box cannot be still. Standing still means its momentum is exactly zero, known perfectly, while its position is pinned to within the width of the box — and the uncertainty principle forbids both at once. So confinement alone puts a floor under the speed, and the tighter the box, the higher the floor: the energy goes as 1/L², so it falls fast as the box grows and reaches zero for no finite box at all.

The number above is computed live from the box you have set — the ground state of a nitrogen molecule in a rigid box of exactly those dimensions, E₀ = (h²/8m)(1/Lx² + 1/Ly²). Two honest caveats: a rigid box with infinitely hard walls is an idealisation, and real nitrogen would have liquefied at 77 K and frozen at 63 K long before a millikelvin, so a nitrogen gas this cold is something this page can compute and the world cannot hold.

The simulation above does not know any of this. It is classical arithmetic and it will happily set every velocity to zero if you ask. The floor is printed beside the temperature so you can see where the model stops being physics.

what is the scale? how big is any of this?

The box is 15.4 × 8.3 nanometres right now, and each disc is 0.37 nm across.

The disc diameter is nitrogen's kinetic diameter, 3.64 ångström — the number zeolite chemists use to decide which gases fit through which pore, and the reason a 3A molecular sieve takes up water vapour but not nitrogen. It is an effective, dynamic size and not a distance between nuclei: a nitrogen molecule has no edge, only a cloud of charge that another molecule feels before anything touches. Drawing it as a disc is the cheapest thing that gets the collisions roughly right, and it is stated as a choice.

For a sense of the scale: the box at its default setting is about a thirty-fifth of the wavelength of green light, so no light microscope at any magnification could ever show it to you — not because the lenses are not good enough, but because the light is too coarse to carry the detail. A human hair is some four and a half thousand times wider than this box. The box size control prints nanometres rather than a multiplier for this reason.

what happens if you push past absolute zero?

Try it — the slider goes there. Nothing here will clamp you and nothing here will pretend.

Take the cold end below zero and the box does the only thing it can do, in front of you, and then the page explains what you just asked for: what is proved impossible, what is merely never done, and the one case where the proof itself says the door is open. It is a longer answer than it looks and it belongs where you break it, not here.

the maths

T = m⟨v²⟩ / 2kB

Temperature is not a setting here. It is measured out of the box: take every molecule's speed, square it, average, multiply by the mass. The slider does not set T — it scales the speeds, and T is read back afterwards.

f(v) = (m v / kBT) · e−mv²/2kBT

The line over the bars is Maxwell and Boltzmann's, drawn from the measured T and nothing else. It is a prediction, not a fit — which is why you can shove the molecules into a heap, watch the bars go wrong, and watch them come back.

SIMULATED 110 hard disks with N₂'s mass (4.65×10⁻²⁶ kg) and kinetic radius, elastic pair collisions resolved along the line of centres, 14 substeps of 0.06 ps per frame, in a box 28 × 11.7 nm. APPROXIMATED two dimensions instead of three; hard disks, so no attraction between molecules and therefore no liquid; the walls are perfect mirrors. SCALED time only — real molecules at 300 K cross this box in about 70 picoseconds, so it is shown roughly 2×10¹⁰ times slower. The speeds in m/s are the real ones. There is no thermostat: what your finger puts in, stays in. The one ceiling is 1500 K, so the chart keeps an axis you can read. ABOUT THE PICTURE a disc is a choice, not a fact. A real molecule is not a little ball; it has no edge, and what it does have is a cloud of charge that another molecule feels before anything touches. Drawing it as a disc that refuses to overlap is the cheapest thing that gets the collisions roughly right, and it is why this box has no liquid in it: with nothing pulling the discs together, they cannot condense. They can still freeze — but only by crowding, never by cooling. That is reel 01's second story, and it is measured on the readout beside the temperature.

02 Heat that makes more heat. The crossing is where it runs away.

drag to push them harder

quiet

Same molecules, same collisions. One rule added: hit hard enough and the pair releases energy.

Slow it down until you can watch single collisions. Add molecules, or squeeze the box, and the reactions come faster — because they meet more often.

300Ktemperature
100%unburnt
0/sreactions
Ktipping point
0.03floor covered
temperature  ·  heat coming out against heat leaking away  ·  the dot is now
the maths

rate ∝ e−Ea/kBT   (Arrhenius)

A collision reacts only if the energy along the line of centres clears Ea. The fraction of collisions that manage it is that exponential — which is why nothing happens for a long time and then everything happens at once.

Q·rate(T)  vs  (T − T₀)/τ

The two curves in the chart. Heat out is the exponential; heat away is a straight line. Below the crossing the straight line wins and the box falls back to room temperature. Above it, the curve wins and pulls itself up. That crossing is the tipping point, and it is solved from the same numbers the collisions use — not typed in.

SIMULATED the same 110 disks; a reaction conserves momentum exactly (Q is returned to the pair's relative motion in their centre-of-mass frame); cooling and fuel supply are first-order with fixed time constants. APPROXIMATED Ea = 0.18 eV, roughly a seventh of a real hydrocarbon's, so that 110 molecules ignite in seconds instead of never; one reaction step, no radicals, no chain branching, no oxygen bookkeeping. The glow colour is Planck's law at each molecule's own ½mv²/kB — an honest picture of the spread, not a claim that one molecule has a temperature.

03 The colour was not chosen. It is the temperature reel 02 reached.

light it

The colour was not chosen. It is worked out from the temperature your runaway reached — 1750 K. Turn it down far enough and the fire goes red and nearly invisible, because that is what cool fire does.

The temperature is set in reel 02, not here — drag that box hotter or cooler and this flame follows it. Below about 1400 K it very nearly disappears, because temperature sets the brightness as steeply as it sets the colour.

1750Kthe colour this temperature gives
0.00green ÷ red
0.00blue ÷ red
fpsmeasured here, now
klight paths per frame
the maths

dI/ds = κ ( B(T) − I )

Along every path through the flame: soot glows (that is B) and soot absorbs (that is κ). Both, at once, integrated step by step. A flame is only half transparent, so neither alone is right.

κ = 7 · fv / λµm  [1/m]

Absorption is stronger at short wavelengths, so blue is eaten first and thick flames go red. Each of the three primaries carries its own κ at its own effective wavelength — 625.2, 535.8 and 475 nm.

SIMULATED emission and absorption along every path, integrated with the exact single-step solution rather than the first-order one (which overshoots badly once κ·ds ≈ 1, as it does inside real soot). B(T) is Planck's law through the CIE 1931 2° observer through an exact-rational sRGB matrix — no colour is authored anywhere in this page. The blue channel is exactly zero below about 1900 K because those blackbodies are outside the screen's gamut; that is a fact about screens, and it fell out rather than being put in. A flame lit by heat alone runs red → orange → yellow → white and never reaches blue: the blue of a gas ring is chemiluminescence, excited CH and C₂ radicals emitting in narrow bands, which is a different mechanism and is not in this model. APPROXIMATED three wavelengths instead of ninety-five (cost, measured against a full spectral march: Δ(x,y) = 0.0076, ΔY = 0.71%); grey body at T + 150 K; the colour polynomial is within 0.0003 stops of the baked table. The 7 in κ contains E(m), which the literature disputes by a factor of 2.5 — soot is uncertain by that much before anything else is. INVENTED — and this is the honest weak half — the shape. Every envelope, taper, puff and wrinkle was drawn to look like a flame and is fitted to nothing. There is no fluid solver: the rising speed is imposed and the temperature rides it, so temperature does not drive the flow — and that coupling is the instability a real flame is. No smoke, no scattering, no wind. Reel 02 hands this one number, the peak temperature; it does not hand it the shape.

04 The same flame, with its six numbers handed over.

presets

the fire  — the measured half

Drag the temperature the whole way. The swatch below it is the colour the arithmetic returns with the brightness divided out, so the shift is readable even where the picture itself has clipped to white or gone black — and it goes black below about 1400 K, because 1200 K is roughly 150 times dimmer than 1750 K. Raise the exposure to bring it back. It never turns blue at any setting: what makes a gas flame blue is not heat but particular molecules emitting — excited CH and C₂ radicals — and this page computes the heat alone.

the shape  — the invented half, and it is declared

the camera  — drag to move · pinch or wheel to zoom · double-tap to put it back

the compute  — push it too far, that is allowed

1750Kthe colour this temperature gives
0.00green ÷ red
0.00blue ÷ red
0.00how opaque, centre
fpsmeasured here, now
Msamples per frame

is this 2-D or 3-D?

The light is 3-D. The shape is 2-D, on purpose. This is not a 3-D flame with the orbit missing.

THE LIGHT IS THREE-DIMENSIONAL and always was. Every pixel marches a real line of sight through a volume — thirty-two slices through the flame's thickness by default, and the depth control is that count. Each slice emits, and everything gathered behind it is dimmed by what it has to pass through on the way out. That is why raising the soot makes the flame stop being see-through, and why how opaque is a number rather than an adjective.

THE SHAPE IS TWO-DIMENSIONAL. The wrinkling is worked out once per pixel from the screen position and then carried straight through the depth: one sheet of structure, extruded. Every slice wrinkles identically, so walking round would show you the same flame, and a control that appeared to orbit would be pretending. There is no orbit because there is nothing to orbit to.

Until now the picture gave the "3-D light" half nothing to stand on: a flame alone in black, with no surface for that light to land on. The environment slider in the camera group (off by default) adds one — a floor lit from the flame's own κ and B(T), not a painted glow. Its own entry says exactly what is computed and what is approximated.

WHY IT WAS BUILT THAT WAY, measured rather than argued: five noise lookups per pixel instead of five per slice is about thirty times less arithmetic at the default depth, and that is the difference between this holding sixty frames a second on a phone and not being shippable at all. Moving those lookups inside the march and adding a yaw would give a genuinely three-dimensional field and a genuine orbit. It is not hard; it is expensive, and the honest way to add it is as an opt-in that prints its own frame rate — not as a default that quietly makes phones stutter.

Sam's own engine can orbit its fire because it has a world underneath it. This page has one plume in empty space and nothing behind it, and it would rather say so than imply otherwise.

can you zoom from the molecules into the flame?

Not honestly — and the one line is: the gap between the two pictures is seven and a half decades in which this page computes nothing.

The box in reel 01 is about fifteen nanometres across and holds a hundred and ten discs. This flame is about six-tenths of a metre tall and stands for something like 10²² molecules. Between them are no droplets, no wisps, no eddies, no soot particles forming — a continuous zoom would have to invent every frame of the journey, and inventing the middle is the one thing this page has refused to do everywhere else. Making it real needs a third simulation in the gap, and then a fourth, because the gap is too wide for one. That is a project, not a control.

Nothing on this page is a picture or a video. Every frame is worked out from the numbers above while you watch — which is why you can put them somewhere nobody sensible would, and it still answers.

the maths

Same integral as reel 03, six numbers exposed instead of one. Temperature sets B(T) — the colour, and far more of the brightness than you would guess: 1200 K is not just redder than 1750 K, it is about 150 times dimmer, so the exposure slider has to make up the difference. That is why a dying ember disappears rather than fading. Soot sets κ. Push it up and the flame as a whole reddens, while the very brightest part gets less red — because a thicker flame stops being seen through and starts showing you its hot near surface. Two effects, opposite directions, both correct. Exposure is a camera stop, applied once at the end, after the physics. Height, puffing and turbulence are shape knobs, and shape is the invented half — they change what it looks like, not what is true.

Blackbody table baked from Planck's law → CIE 1931 2° observer → linear sRGB. Soot absorption after NIST Technical Note 1402 (RADCAL), Rayleigh limit. Radiometry and the plume-age parametrisation follow the fire lab in Sam's engine (docs/FIRE.md), reimplemented here so this page carries no dependencies and makes no outside requests.