Artificial intelligent assistant

The forever moving billiard ball Suppose I have a rectangular table, dimensions $x$ by $y$, and a billiard ball is positioned in the very center. For descriptive convenience, let us impose a coordinate system on this table with an origin (0,0) in the center of the table where I strike the ball. Now say I strike the ball at an angle of $\theta$ with respect to the horizontal. If the ball moves forever after being struck, for what values of $\theta$ will the ball form a closed loop and eventually return to initial conditions and retrace its own path all over again, and for what value of $\theta$ will the ball not form a closed loop and never re-trace its own path?

If you unfold the billiard trajectory, the question becomes equivalent to this:

* Suppose I have a rectangular lattice, where the unit cell has dimensions $x$ by $y$, and a billiard ball is positioned on a lattice point, which we will call the origin $(0,0)$. For what values of $\theta$ will the ball strike another lattice point $(mx,ny)$, where $m$ and $n$ are even integers?



Does that help?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 2b46ae134e0b6cad1bacc46bac04aecd