It will explain my use case at the end, in case I am approaching this wrong, but I will start with the math question.
Given:
- a point $\rm P$ on an ellipse;
- the slope of the tangent (or normal) to the ellipse at $\rm P$; and
- the horizontal and vertical distances from the ellipse’s center and $\rm P$,
how I can mathematically represent the ellipse?
I'm sure that was unintelligible, so pictorally, here is the situation:
As you can see, for simplicity, I've taken the liberty of placing the ellipse where the center is on the x-axis, because that works for me. I've made my fixed point on the horizontal x-axis at the origin, also for simplicity (you'll see why later). I know the location of the point on the ellipse $(-c, d)$, and I know the angle/slope of the normal at that point (which I've called $\phi$, and therefore also the tangent. Since I have made the ellipse pass through the origin, I know the center of the ellipse is at $(-a, 0)$. However, I am struggling to determine the values of $a$ and $b$ that I need to complete the equation for the ellipse.
Here's my actual use case: there's a rectangular robot, and a target that I want to drive to. That target is on a wall, which is likely at an angle to robot. I want the robot to arrive at the wall with the front of the robot flat against the wall, meaning that direction the robot travels the instant it touches the wall is perpendicular to it. I thought that I should be able to follow the elliptical arc for a nice, smooth path to achieve that. But to do that, I need to represent the ellipse mathematically.
Basically, here's what I'm looking to do:
I know the points $(u, v)$ and $(x, y)$, relative to the robot, that are on the target wall, equidistant from the target point itself, and can therefore identify the location of the target, and the angle/slope of the target wall. I could also easily flip that to identify the tangent at that point.
I want to identify that magenta path so that I can have the robot follow it. I want to do this computationally on the fly, which also means I can't plug values into an equation and solve "interactively".
By looking around this site, I've found that the equation for the normal at $(X, Y)$ is: $\frac{(X-h)(y-Y)}{a^2}-\frac{(x-X)(Y-k)}{b^2}=0$, which in my case means that: $\frac{(-c+a)(y-d)}{a^2}-\frac{(x+c)d}{b^2}=0$, but I cannot get much further than that, and could really use some help.


Just exploit the principle that an ellipse is a stretched circle.
Let $P$ our point, $\tau$ the known tangent through $P$, $O$ the center of the ellipse.
We find the $x$-compression factor sending the ellipse into a circle in the following way:
I leave to you to convert this geometric approach into a formula for the coordinates of $S,V,F_1,F_2$ given the coordinates of $P$ and the slope of $\tau$.