Python find the projection point of a known point on an ellipse

684 Views Asked by At

I need to implement this process:

Regarding the following image I know the coordinates of the red dots. I have to find the projection of the red point in ellipse, thus the purple point of the ellipse.

I have the points of the orange line and the points of the ellipse.

Is there any available algorithm to do this?enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

From the picture I assume the other red point is the origin and you know the equation of the orange line. Now the purple point is the reflection of the red point wrt the orange line. So if the orange line makes angle $\theta$ with $x$-axis then reflection $(x',y')$ of any point $(x,y)$ is given by $x'=x\cos2\theta +y\sin2\theta; y'=x\sin2\theta -y\cos2\theta$.