I have spent a considerable amount of time trying to simulate soap films. This video shows how beautiful these films are.

Soap films are formed by water sandwiched between two layers of soap. Soap plays the role of a *surfactant*, dissolving in the water and reducing its surface tension. The two layers of surfactant repel each other and stabilize the film.
The colors of a soap film are caused by thin-film interference, which selectively amplifies and attenuates different frequencies of light depending on the film's thickness. Once you compensate for the eye's response to the spectrum, it's possible to compute the color of the film for a given thickness (along the x-axis, in nanometers):
![[cdd9f26e-7051-4171-8ce9-382225ec66b2_719x282.webp]]
If you compare this chart to the video, you can clearly see that the film is thinnest in the center.
The fluid dynamics of the film are considerably more complicated to calculate, requiring some form of simulation. The model I'm developing uses smoothed particle hydrodynamics, but I haven't been able to generate any really interesting effects yet. Stay tuned!