I'm trying to figure this out on my own so no direct answers please - I really am looking for pointers on different ways to approach this problem.
Given some dimensions, a point A, a point B, and a maximum distance, calculate how many possible paths exist from A to B where the distance between A and B is less than or equal to the max distance. If a path intersects a "wall" it will reflect at the angle of incidence. If a path intersects a "corner" it will reflect back the way it came.
For example:
If you have a plane with dimensions 2x3, with point A at $(1,1)$ and point B at $(2,1)$ and a max distance of 4, there are 7 vectors that lead from A to B (with total path length less than or equal to max distance) either directly or by reflecting off a "wall". Examples of some of the $7$ answer vectors are $(0,1), (1,2),(1,-2),(-3,-2)$ which I have diagrammed on the sketch below. The problem is that I don't have any of this vector information, I only have the dimensions, point A and B, and the max distance - all of which are variable depending on the input.
Any pointers or thoughts on how to approach this problem would be appreciated.
Thanks


