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?

-
Assume the radius of the ball is $0$, the trajectory of the ball forms a closed loop iff $\frac{x\tan\theta}{y} \in \mathbb{Q}$ –  achille hui Nov 16 '13 at 8:44
I think Chaos Theory is relevant here, but I'm not entirely sure why. There's a Numberphile video that might talk of something similar $\dots$ –  Shaun Nov 16 '13 at 8:52

• 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?