Determine approximative field of view through a mirror. While developping a game with Unreal Engine, I'm trying to calculate what a player can see when looking at a mirror. The figure below illustrates the reflected approximative field of view that I'm trying to calculate.
A player (not represented in the figure) is looking at a mirror AB (considering the player sees all the mirror and not just only a part of it). The extensions of the extremities of its field of view are represented as the lines (AA') and (BB'). To approximate the next calculations, I want to retrieve the cone defined by A'MB'. The range of his view is set by the length MM'.
So in total as data we have:

*

*The length AB

*The angle $\alpha$ (defined as the angle between (the line orthogonal to (AB)), and (AA'))

*The angle $\beta$  (defined as the angle between (the line orthogonal to (AB)), and (BB'))

*The length MM'

*A'MB' is isosceles (MA' = MB')

*M is the middle of [AB]

The question is: how to calculate the length AA' and BB' ?

What I tried so far:

*

*Draw right-angled triangle to apply trigonometric functions (with the height of the triangles AMA' or BMB' for example) but I couldn't find any triangle that would help me solve it.

*Draw the extension of the lines (AA') and (BB') to obtain a triangle including A'MB' but I did not find any use for it.

*Ask a lot of people around me without any luck ^^

Thanks in advance
 A: I've given way of solution to you in the chat.

Let mark $MA'=MB'=l$. Using cosine rule one can express $AA'$ and $BB'$ in terms of $AB$, $\alpha$, $\beta$ and $l$.
Then one can use $A'B'^2=(a\cos\alpha-b\cos\beta)^2+(AB+b\sin\beta-a\sin\alpha)^2=4(l^2-r^2)$.
This is equation on $l$.
After finding $l$, one can put it into expressions for $AA'$ and $BB'$.

Equation for $l$ is too hard to solve it analytically:
$$4\,r^2+\left(\sin \beta\,\left(\sqrt{l^2-\cos ^2\beta\,d^2}-\sin 
 \beta\,d\right)+\sin \alpha\,\left(-\sqrt{l^2-\cos ^2\alpha\,d^2}-
 \sin \alpha\,d\right)+2\,d\right)^2+\left(\cos \alpha\,\left(\sqrt{l
 ^2-\cos ^2\alpha\,d^2}+\sin \alpha\,d\right)-\cos \beta\,\left(
 \sqrt{l^2-\cos ^2\beta\,d^2}-\sin \beta\,d\right)\right)^2-4\,l^2=0$$
I believe (I may be wrong in it), if even analytical expression of $l$ in terms of $r=MM'$, $d=AB/2$, $\alpha$, $\beta$ exists, it will be too long to write it in a program code. As your need suggests numerical calculation I propose to solve it numerically.
Numerical procedure may be the following:

*

*Write function for calculation of residue $res$ of equation as function of $l$, using formulae:

$$a=d \sin \alpha+\sqrt{l^2-d^2\cos^2\alpha}$$
$$b=-d \sin \beta+\sqrt{l^2-d^2\cos^2\beta}$$
$$l_1=a\cos\alpha-b\cos\beta$$
$$l_2=2d+b\sin\beta-a\sin\alpha$$
$$res=l_1^2+l_2^2+4r^2-4l^2$$


*Make search of $l$ that makes $res$ zero. You can start with $l=d$ and increase with rough steps until residue becomes negative. Then you can use half division, till get necessary precision.


*Put found $l$ value into $a$ and $b$ expressions.
