Soap Bubble Cluster

Soap bubbles get their shifting rainbow colors from thin-film interference: light reflecting off the front and back surfaces of the microns-thin soap film interferes constructively or destructively depending on film thickness and viewing angle, obeying Plateau's laws when bubbles cluster and merge. This scene renders 22 icosahedron bubbles with a fresnel-driven GLSL shader that maps view angle to a hue-cycling thin-film color, while a simple state machine (growing, alive, popping, gone) drives buoyant drift, boundary bouncing, proximity-based merging, and sparkle-burst particles on pop.

Bubble count
22
Technique
Fresnel thin-film shader
Sparkle particles
200 max
Geometry
Icosahedron (subdiv 3)
Merge chance
1%/frame
1.0