This bottle of bubbles demonstrates the use of d3.timer for animation. The molecule reflections are computed using functions in the geoemetry_methods.js file. See the previous Path-Line Intersection and Path-Line Reflection blocks for details.
geoemetry_methods.js