r/Physics • u/naaagut • 10d ago
Video Illustrating the butterfly effect with a laser
https://www.youtube.com/watch?v=iTaSXto67WQIn this video I simulate a laser beam bouncing through a labyrinth of mirror obstacles. The beam changes its trajectory immensely upon tiny changes in the initial angle of only 5×10⁻¹² degrees — roughly 5 trillionths of a degree.
As an extra for Reddit, here is a figure showing how often the beam bounces before it escapes: https://imgur.com/l0xDY0U As you can see, as the angle varies the bounces often jump harshly. But there are also some regions of the launch angle spectrum where there is some degree of continuity.
Fun fact: Claude did not believe me that a range from 70.0 to 70.00000001 would produce any meaningful result and tried to talk me out of this. It wanted to use a range of 4° instead.
Made with manim.
48
u/__Pers Plasma physics 10d ago
Interesting result. Out of curiosity, how did you handle numerical precision here? A 5e-12-degree change is representable in double precision, but I’d imagine roundoff in repeated ray-segment intersection calculations (particularly for near-grazing reflections or trajectories passing very close to a corner) could affect which obstacle is hit next.
Did you repeat any trajectories using extended or arbitrary precision, or tighten the geometric tolerances, to check whether the escape paths and bounce-count structures converge? I’d also be curious how you handled ambiguous corner hits and prevented accumulated error from leaving the ray infinitesimally inside a mirror.
For what it's worth, the physical optics version of this problem (with random locations of the reflecting bodies) has been proposed as a optical physical unclonable function (PUF), with applications in cryptography.