Technique · Fields

Soap film

The swirling rainbow of a soap bubble or oil slick: interference colours from a film of changing thickness, stirred and slowly flowing.

Soap film is a field drawn for every pixel by the graphics chip. Every piece on Synapse Drip is made from a recipe that layers techniques like this one, and you can change any of it in the Studio.

Good to know

  • Structural colour, made by interference rather than pigment, is how the wings of a Morpho butterfly and the feathers of a peacock get their blues and greens: layers of material a few hundred nanometres thick reflect each colour in step.
  • The swirling in a real film is driven by the Marangoni effect: where the film is stretched thin the soap is more dilute, the surface tension is higher, and the surface pulls fluid toward it.
  • Oil on water gives the same colours because the film of oil, with a refractive index near 1.5, has two surfaces for the light to reflect from, one on top and one on the water beneath.
  • Robert Hooke described the colours of thin plates and soap bubbles in Micrographia in 1665, Isaac Newton measured them in Opticks in 1704, and Thomas Young explained them as interference of light in 1801.
  • A film in a vertical soap bubble drains downward under gravity, and at the top it gets so thin, a few tens of nanometres, that the reflections cancel and it turns black just before it bursts.

The mathematics

  • Red light is reflected most strongly each time the film's thickness grows by half a wavelength inside the film, 650 / (2 x 1.33) = 244 nanometres; for green the step is 205 and for blue 171, so the three colours keep slipping out of step, and a thickness range of 760 nanometres takes the film through about 3.11 cycles of red.
  • The colour at a point is (sin squared of the phase) for each of red, green and blue, with phase = 2 pi n d / wavelength; where the phases happen to agree the film looks white, where red and blue are strong and green weak it looks magenta, and so on, which is why a spectrum of colours appears rather than a single hue.
  • The thickness field is noise warped three times by noise (domain warping), which makes the marbled folds; light from the film's slope gives the white sheen along the ripples.

In art

  • Iridescent, holographic gradients became a design trend in the late 2010s, in packaging, fashion and interfaces; the film here is the natural source of the look.
  • Photographers shoot soap films and oil slicks in macro for the same reason painters of marbled paper do: the colour pours and folds in ways nobody could draw by hand.

More ways to use it

Related techniques

Nebula and stars · Liquid · Droplets · Network · Terrain and maps · Neuron · Order to chaos · Fractal tree

All 90 techniques