If I understand correctly, you want all the angles that work.
You just pave the plane with pool tables so that 2 tables that share a
side are mirror images with respect to that side. Then you put a ball
on one of the tables, and aim for all the pockets.
You actually notice that since the pocket is in a corner, it will be
shared by four tables. This amount to putting the ball at coordinate
(0,0) in the plane, and the pockets at coordinates (2i, 2j+1) for all
integer values (positive and negative) of i and j. So the angles are
arctg(2j+1 / 2i) for all integer values of i and j, with i non null,
plus the angles $\pi/2$ and $3\pi/2$, in the positive angular direction from the X axis.
To avoid special cases here, it is probably better to use arccotg(2i /
2j+1), so as to avoid zero as denominator.
The first comment by @Nick is not quite true. If you require exact
angles, you will not have all of them because you have only a
denumerable number of them that work, as the above set of ratios 2i /
2j+i (reversed to avoid infinity) is a denumerable set, but you have a
continuous set of angles in [0, 2$\pi$]. However, it is almost true as
tangent (or rather cotangent here) is a continuous function, and the
set of ratios is a dense subset of the reals. That means that any
angle that is not the above defined set can be approximated as
precisely as you want by an angle in the set.
However, to approximate angles, you need to consider pockets that are very far away, so that whatever small error is made on the angle will be amplified by distance, so that the pocket may actually be missed by a wide margin. I have not yet worked out whether that can be be approximated too, but I very much doubt it.
Indeed, the angles 0 and $\pi$ follows the X axis and never get
arbitrarily close to a pocket, even by going far enough. This is also clearly true for the diagonals (x=y). The same is true, though with increasingly smaller minimal distance to pockets,
for all angles defined by arctg (2j+1 / 2i+1), for all i and j. These
angles are as many as the succesful ones.
These very special pockets are very tolerant on velocity angle, but probably not on position. The idea is that the ball is point-like.
In this abstract problem, where the balls is dimensionless, I considered
that it is possible to bounce from the lowest corner sides. If you do
not want that, you just keep the first quadrant with arctg(2j-1 /
2i) for i and j positive integers, and you add $\pi/2$ for the direct shot.
Another interesting fact is that the number of bounces is necessarily
an odd number, if you do not allow bouncing in the initial corner, i.e., if you consider only the first quadrant.
Given a fixed positive number n of bounces, and considering only the first quadrant, there are $(n+1)/2$ solutions which are defined as $arctg((2j-1) /
2i)$ for $i$ and $j$ positive such that $i+j=(n+3)/2$
Use a long cue, some pockets are far away, and as they say, infinity is
very far, especially at the end.