I have a flat mirror and a target. Given the sun's light angle of incidence, I must calculate how much to spin my mirror to hit the target with the light. The problem is shown in the following figure.
Given $a$, the angle of sun's light incidence, and $b$, the angle the reflected light must have in order to reach the target (from the center of the mirror), I must calculate $c$, the angle the mirror must spin. Simple enought, the solution is given by:
$c = {a + b \over 2}$
But there is a variation of this situation where it is not possible to rotate the mirror from it's center. The mirror is attached on the surface of a cylinder, and the spin is relative to the cylinder's center. In this new situation, $b$ is function of $c$.
Considering I had the brilliant idea of using positive y-axis for angle reference, I soon figured out that
$ \begin{aligned} & x' = x - (- r \sin c) \\ & y' = y - r \cos c \\ & \tan b = {x' \over y'} \end{aligned} $
thus
$ \begin{aligned} & c = {a + b(c) \over 2} \\ & c = {a + \arctan {x + r \sin c \over y - r \cos c} \over 2} \\ & 2 c = a + \arctan {x + r \sin c \over y - r \cos c} \\ & \tan (2 c - a) = {x + r \sin c \over y - r \cos c} \\ & {\sin (2 c - a) \over \cos (2 c - a)} = {x + r \sin c \over y - r \cos c} \end{aligned} $
This is as far as I could get finding $c$. I was not able to isolate $c$ in the equation, nor could I find a simpler relation between $c$ and $b$. How can I find $c$? Is there a simpler way to define $b(c)$, that does not resort to trigonometry? If not, how can I isolate $c$ in that last equation?
I need to program it, and I'd rather not resort to numerical methods because I can't remember a damn thing about it.