A Geometry Question,maybe have something to do with specular reflection
Let us assume that a billiard ball which strikes a flat wall will bounce off in such a way that the two lines of the path followed by the ball (before and after the collision) make equal angles with the wall. Consider $n$ lines $D_1,D_2,...,D_n$ in the plane, and points $A,B$ on the same side of all of these lines. In what direction should a billiard ball be shot from $A$ in order that it arrive at $B$ after having bounced off each of the given lines successively? Show that the path followed by the ball in this case is the shortest broken line going from $A$ to $B$ and having successive vertices on the given lines.
_Special Case._ The given lines are the four sides of rectangle, taken in their natural order; the point $B$ coincides with $A$ and is inside the rectangle. Show that, in this case, the path travelled by the ball is equal to the sum of the diagonals of the rectangle.
Hint: Reflect point $B$ across line $D_n$, then $D_{n-1}$...