A laser fires from the left edge of an 800 by 600 board and a target sits on the right edge. Circles in between block the straight shot, and you place mirrors to bounce the beam around them. Fewer mirrors is a better score.
Tracing the beam
The beam is a ray and each mirror is a 60-pixel segment. For every mirror I solve the ray-segment intersection as a 2x2 linear system and keep the hit only if the ray parameter is positive and the segment parameter is between 0 and 1. For every circle, substituting the ray into \(|\mathbf{o} + t\,\mathbf{d} - \mathbf{c}|^2 = R^2\) gives a quadratic in \(t\), and a non-negative discriminant is a hit. The nearest hit wins. An obstacle or the board edge stops the beam there, and reaching the target solves the level. A mirror with unit normal \(\hat{\mathbf{n}}\) reflects it,
\[\mathbf{d}' = \mathbf{d} - 2(\mathbf{d} \cdot \hat{\mathbf{n}})\,\hat{\mathbf{n}},\]and the trace carries on, up to 50 bounces so two facing mirrors can't hang the page. Mirrors rotate continuously rather than snapping to 45 degrees, and the whole path is retraced every frame while one is still being turned, so the beam sweeps across the board until it lands. The beam is the only bright thing on a dark board, and the target turns green when it's hit.
Levels
Each level is random rather than seeded. The first obstacle always goes on the straight line between laser and target, offset by less than its own radius so the direct shot is blocked. Then 5 plus twice the level number more circles land at random, with clearance around the laser, the target, and each other, and a circle that can't find a spot is dropped. The layout is base64-encoded into a game parameter in the URL, so a link to the page is a link to that exact puzzle and someone else can try to beat your mirror count on it.