How it works
A real soap bubble, worked out
A soap bubble is a shell of soapy water about a thousandth of a millimeter thick, with air inside. Everything below is either worked out from physics or a rule we set for the game.
Worked out from physics
- The colors. Light bounces off the outer and the inner face of the soap. The two reflections add up for some colors and cancel for others, depending on how thick the soap is. For every point on the bubble we take its thickness, the viewing angle, daylight and how the eye sees color (CIE 1931), and work out the color.
- Why it thins at the top. Gravity pulls the soapy water down, so a bubble is thinnest at the top and thickest at the bottom, and the top turns black first.
- The black patch. When soap gets thinner than about 25 nanometers it turns into a "black film" only a few nanometers thick. The two reflections then cancel for every color, so it looks black. It starts at the top, where the soap is thinnest.
- The motion. The bubble's weight is the weight of its soap, so a thinner bubble is lighter. Air drag on a sphere slows it down. Each tap is a puff of air spreading out from your finger; the specks in the air show where it flows.
- The pop. A hole in a soap film opens at v = √(2σ / ρh): σ is the pull of the soap's surface (0.025 N/m), ρ the density of water, h the thickness. Thinner soap opens faster. The game works out how long the hole takes to reach every point, so the hole runs fast where the soap is thin and slow where it is thick. A real pop takes a few thousandths of a second, so we show it slowed down, by the factor on screen.
Rules we set for the game
- How fast the soap thins. Real bubbles last from seconds to minutes; this one lasts about half a minute unless you catch soap drops.
- Soap drops that make it thicker again, the thorns, the wind and the bubble's size (7 cm across; the screen is 30 cm wide).
- The pop point: the bubble breaks when the black patch covers about a third of it. Real bubbles can break sooner or later.
- The view. We look at the bubble from a little above, so you can see its top, and the view zooms in during the pop. The lights it reflects (two windows and a sky) are made up.
- Brightness. A real bubble reflects at most about 8% of the light, so we brighten it. The thin-film colors themselves are not changed.
Soap film colors by thickness, seen straight on, worked out the same way the game does. (On the bubble the top is seen at a slant, which shifts its colors a little; the in-game strip shows them as the top looks.)
Today's course
Everyone gets the same course each day, so you can compare heights with friends. "Random course" gives you a new one any time.