soap bubbles

(version française)

Summer is very hot this year...

After reading a book about fractals, I came to the idea (not totally related, but that's how the mind works sometimes...) to raytrace a heap of soap bubbles, with realistic intersections.

The main simplification is to suppose the pressure inside each bubble is the same, so internal interfaces are planar. With that hypothesis, the interface between two bubbles can only be the disc inside the circle that's the intersection the two spheres.

My first idea was to describe surfaces (truncated spheres, discs, truncated discs), but with POV-Ray scene language, describing bubble volumes was actually easier, and potentially more interesting (filling each bubble separately,...) I feared duplicating internal interfaces could affect rendering, but I didn't notice anything.

I wrote a Perl script to compute the bubbles geometry (I since learned that POV-Ray scene language allows many things like loops, etc. I it may be possible to achieve the same result with POV-Ray alone; but I'm a Perl addict...) A lot of code is just the implementation of common vector operators.

Here is an example of generated bubbles CSG geometry.

The POV-Ray scene main file is rather standard, and uses the irid effect to render the soap bubbles.

To do : the random placement of bubbles doesn't look very natural. A simulation (gravity, bubbles repulsion,...) should be run before scene generation...

And now for some result pictures and movies:

Enjoy!

petchema at concept-micro dot com