TITLE: 3D Billiards problem inside a torus
QUESTION [39 upvotes]: I have been trying to simulate the behavior of a light particle being reflected inside of a torus (essentially a 3D billiards problem). I have found that after a few thousand bounces, it converges on "rolling" behavior; that is, the bounces get shorter and shorter and it essentially sticks to the surface. The simulation basically can't progress beyond this point as a result. Below is the part of the trajectory that illustrates this behavior; the trajectory goes from chaotic to convergent along the surface of the torus:

On the left can be seen the discrete bounces, and on the right is where the particle sticks to the surface (until program termination).
It seems counter-intuitive that a the trajectory could become trapped like this after demonstrating chaotic behavior for thousands of prior bounces. Closer examination reveals that the angles become more and more grazing with each bounce, and the distances between bounces shorter, until no progress can be made.
If I had infinite numerical precision to peek past this event horizon, would I eventually find that the particle breaks free again? Or is it possible that this is also a theoretical limit, and the motion of the particle has transitioned from finite segments to a continuous curve constrained to the surface? Can this happen in 3D billiards problems, or does chaos dictate that this behavior would reverse after some unknown amount of time?

REPLY [16 votes]: As to the fact that this improbable scenario arose from chaos, it seems that numerical error really was at fault (my bisection code was faulty).

This behavior is more to be expected.
EDIT: According to the literature, as Carlo Beenakker pointed out, such "whispering gallery modes" wherein trajectories can stay arbitrarily close to the surface can only exist if they trace out a curve with strictly concave curvature everywhere -- a condition often violated in a torus. This, together with $C^6$ regularity, are a sufficient condition for the existence of such caustics. Quite an improvement over the previous result by Lazutkin demanding $C^{553}$ regularity.
Source: https://mat-web.upc.edu/people/rafael.ramirez/res/pdf/oberwolfach10.pdf