# How to construct ray reflection from convex curved surface

I'm trying to understand how to construct the reflection path of a ray from a curved surface. Here's the basic setup:

In a 2D space, assume a point S is the source of a ray and point R is the receiver. An arbitrary convex line is located in space and acts as a perfect reflector for incoming rays. How can I construct the reflection path (should it exist) between S and R?

If the reflector was a straight line, I'd would use the image-source-method and be done with it. If the reflector was a circle, I'd resort to something along the line discussed here.

But how can the problem be solved if the reflector is an arbitrary line? For simplicity we might assume that the curvature always remains positive, so the line is strictly convex. This would limit the number of possible solutions to exactly one.

Thanks for your input - any hint is greatly appreciated.

• Do we know the radius of that convex surface? – Rakibul Islam Prince Sep 18 '18 at 7:47
• There certainly isn't a closed-form answer for an arbitrary curve, you will have to resort to some iterative process. A bisection search might do the job: find a point on the reflector such that the ray from S after reflection is too far to the left of R, and another where the reflected ray is too far to the right, then successively halve the segment of the curve between those two points. – Rahul Sep 18 '18 at 7:47

With a rotation and a translation of the axes you can put $S$ in the origin and $R$ on the x-axis. Let's say that $f$ is the equation of the mirror line in these coordinates.
Calling $P$ the incidence point and $m$ the angular coefficient of the source ray, you just have to find the solution of these simultaneous equations: $$y_P/x_P-m=0$$ $$y_P-f(x_P)=0$$ $$x_P-y_P/(f'(x_P)-m)=x_R$$
The first is the equation of the source ray, the second fixes the reflection point on the mirror line and the third imposes the reflected ray to pass through $R$.