Reflecting a vector within a box (variation on the billiards problem)

68 Views Asked by At

Let there be a box, with bottom left corner at (0,0), and top right corner being at (m,n), where m and n are positive integers.

A starting point is chosen at random within the box at (x,y), such that 0 < x < m, and 0 < y < n.

From the starting point, create a vector with integer components. Once the vector hits a side of the box, it will reflect off the side, similar to the billiards problem, but not necessarily at a 45 degree angle.

Question:

Provided that the vector will continue reflecting in the box for a very long, but finite time (say, 10,000 units), for a given vector, I want to determine

1) whether the vector will eventually hit a corner.

2) whether the vector will eventually hit the starting point.

1

There are 1 best solutions below

0
On

A second hint (after amd's comment):

Let ${\bf v}=(p,q)$ be the initial velocity. Consider the huge number $N:={\rm lcm}(m,n,p,q)$.