Youtube Google Play Contact Blog

Soap bubble

The rainbow color of soap bubbles is generated by the interference of light, and the color changes depending on the thickness. This time, I used a Python library called Colorpy to generate a soap bubble gradation in advance. By making it correspond to the concentration of fluid simulation, it expresses the movement of soap bubbles that move swayingly.

Live demo

Note: this demo is heavy. It might takes a long time.



Source code is straightforward.


By far faster because it uses GPU.


Leave a comment

Your email address will not be published.