This question was recently asked on a National level Olympiad. It reads:
Consider a circle of radius $R$ centered at the origin. A particle is launched from the $x$-axis at a distance $d$ from the origin such that $0<d<R$ at an angle $\alpha$ with the $x$-axis. The particle is reflected from the boundary of the circle so that the angle of incidence equals the angle of reflection. Determine the angle $\alpha$ such that the particle strikes the interior of the circle at exactly eight distinct points. (The value of $\alpha$ is to be expressed in terms of $R$ and $d$)
My attempt:
I tried visualizing this problem in a trivial case where the particle strikes the interior exactly five times. Upon applying some elementary geometry, I came to know that the particle strikes the interior tracing congruent isosceles triangles $OA_i A_{i+1}$ where $A_i$ is the point of incidence. Since the particle traces the exact same path as it did in its first "launch" in its last strike (to strike at exactly 5 points), the particle traces a star like shape, where each "leg" of the star is congruent to another (since the triangles are congruent isosceles triangles). If we join the points of incidence, we obtain a regular pentagon and also see that the trajectory of the particle is the diagonals of the pentagon. Generalising this further, in case of 8 points, we obtain a regular octagon with the trajectory being the diagonals (excluding the main diagonals as they act as axes of symmetry). After this, the value of $\alpha$ can be computed easily by applying some elementary geometry and trigonometry.
Is this solution valid or does it need some modification?

There are two regular octagons that you can inscribe into a circle: an ordinary one, or a self-intersecting one (star-shaped, "octagram"). You can imagine that you draw one of those (or both - even if that would make a messy picture) and then rotate the octagon until one of its legs goes through the point $(r,0)$. At that point, you just need to let the particle go along that leg.
This implies that, depending on $r$, this may have $0$, $1$ or $2$ different solutions: