Alexis Mabanza @ alexvolkihar.ovh

Foam

Soap films relaxed towards Plateau's laws

Soap foam follows a few strict rules, found by Joseph Plateau in the nineteenth century: films are smooth, they meet three at a time, and they meet at 120°. Here every bubble starts as a disc of a given size, all the same, spread out, in two families, or the mixed sizes of a foam that has aged. The discs push one another apart until neighbouring surfaces cross at Plateau’s angle, and each bubble then becomes its power (Laguerre) cell, cut by its own disc. A dry foam closes into polygons, a wet one leaves round bubbles in the liquid. Each film is bent into an arc by the pressure difference across it, so a small bubble always bulges into a bigger one, and every junction swells into a Plateau border, a small concave triangle of liquid that grows with the liquid fraction. The foam fills the frame, floats as a raft on water, stands in a dish, or drains: dry and coarse at the top, wet near the foam line, with loose bubbles rising through the liquid below. The bubbles are painted in the interference colours of a thin soap film (computed from its thickness, thin at the top where the film drains), as clear bubbles lit from behind, or as an ink plate in which the cells that are not hexagons are hatched. Press New seed for a fresh hash, then share the URL to show someone that exact piece.

All series
0x9b9c8ab4…dea7
Film IridescentLayout DrainageWetness MoistBubbles PolydispersePalette Night
0x17ac228d…85ed
Film IridescentLayout DishWetness DryBubbles PolydispersePalette Abyss
0xad48be66…2cc7
Film PlateLayout DrainageWetness DryBubbles BimodalPalette Ember
0xa061c5d2…c7ab
Film IridescentLayout SheetWetness MoistBubbles PolydispersePalette Milk
0x787500ae…802b
Film ClearLayout SheetWetness DryBubbles MonodispersePalette Rose
0xfd5483c9…403e
Film IridescentLayout RaftWetness MoistBubbles PolydispersePalette Night
0xddba364f…76e3
Film PlateLayout SheetWetness DryBubbles PolydispersePalette Night
0xaf5d4ce1…6aea
Film PlateLayout RaftWetness DryBubbles PolydispersePalette Night
0xbb32ca24…da9e
Film ClearLayout RaftWetness MoistBubbles PolydispersePalette Ember
0x300250dc…ad0a
Film ClearLayout DrainageWetness WetBubbles PolydispersePalette Milk
0xfb43480b…9c63
Film ClearLayout DishWetness DryBubbles MonodispersePalette Rose
0xbb22dc27…3df8
Film PlateLayout DishWetness MoistBubbles PolydispersePalette Night

Traits

The weights were set before any drawing code was written. They were then checked against a census of 2,000 seeds.

TraitValues (weight)
FilmIridescent 45 · Clear 30 · Plate 25
LayoutSheet 40 · Raft 25 · Drainage 20 · Dish 15
WetnessDry 35 · Moist 40 · Wet 25
BubblesPolydisperse 40 · Monodisperse 20 · Bimodal 25 · Coarsened 15
PaletteNight 24 · Abyss 18 · Ember 10 · Milk 20 · Seafoam 16 · Rose 12

Credits

  • Laws of the films: J. Plateau, Statique expérimentale et théorique des liquides soumis aux seules forces moléculaires (1873), and D. Weaire and S. Hutzler, The Physics of Foams (Oxford University Press, 1999), for the circular arcs of a 2D foam, their curvature set by the pressure difference (Laplace–Young), the Plateau borders of a wet foam and the role of cells with fewer or more than six sides.
  • Cells: F. Aurenhammer, Power diagrams: properties, algorithms and applications (SIAM J. Comput. 16, 1987). Each cell is a Laguerre cell clipped by its own disc, computed by half-plane clipping.
  • Packing: a soft-disc relaxation in the spirit of D. J. Durian’s bubble model, Foam mechanics at the bubble scale (Phys. Rev. Lett. 75, 1995), with the discs inflated during the run as in Lubachevsky and Stillinger’s compression of hard discs.
  • Hatching: by von Neumann’s law (1952), a cell of a 2D foam with fewer than six sides shrinks and one with more than six grows as the foam coarsens.
  • Film colours: the Airy reflectance of a soap film integrated against the CIE 1931 colour matching functions, using the fits of C. Wyman, P.-P. Sloan and P. Shirley, Simple analytic approximations to the CIE XYZ color matching functions (JCGT 2(2), 2013).
  • Randomness: sfc32 by Chris Doty-Humphrey. The hash seeding, named sub-streams and verification follow Camille Roux’s genart skill (MIT).
  • The palettes are original. The code was written with an AI assistant. It draws everything itself: no AI-generated images.

Artworks © Alexvolkihar, licensed CC BY-NC-ND 4.0. Code under the repository licence (MIT).


>