How to determine the reflection point on an ellipse Here is my problem. There are  two points P and Q outside an ellipse, where the coordinates of the P and Q are known. The shape of the ellipse is also known. A ray comming from point P is reflected by the ellipse and arrivates at Q. The question is how to determine the reflection point on the ellipse. I mean is there any analytical method to calculate the coordinate of the reflection point?


You could orient the coordinate system to prefer the ellipse. That is, take your original coordinate system, and find the translation that moves the ellipse origin to the center. And find the rotation that aligns the ellipse axes with the coordinate axes. Apply these to $P$ and $Q$, so now the problem is...
We have an ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ and points $P'=(h,k)$ and $Q'=(m,n)$. Where is the point $M'$ on the ellipse such that the ray $P'M'$ reflects to $Q'$?
The ellipse edge is traced by $r(t)=(a\cos(t),b\sin(t))$. At $t$, the tangent vector is $\vec{u}=\langle -a\sin(t),b\cos(t)\rangle$.
At $t$, the line from $P'$ has direction $\vec{v}=\langle a\cos(t)-h,b\sin(t)-k\rangle$.
At $t$, the line from $Q'$ has direction $\vec{w}=\langle a\cos(t)-m,b\sin(t)-n\rangle$.
The relationship between these three vectors needs to be that the sum of normalized $\vec{v}$ and normalized $\vec{w}$ is orthogonal to $\vec{u}$. That is: $$\left(\frac{\vec{v}}{\lVert\vec{v}\rVert}+\frac{\vec{w}}{\lVert\vec{w}\rVert}\right)\cdot \vec{u}=0$$
That sets up a polynomial equation in $\sin(t)$ and $\cos(t)$, where you could solve for $t$. There may be multiple solutions, some of which correspond to a ray that passes into the ellipse and reflecting from the inside. After finding $t$, that tells you $M'$. And then you can undo the original coordinate transformation to answer the original question.
