Given I have (in a 2D coordinate system) an ellipse with the center at $(c_x,c_y) = (0,0)$ where I do not know the actual value of the major an minor axis but I have the ratio $r=\frac{a}{b}$ and an inclination angle $\phi$. If I know that the point $p = (p_x,p_y)$ are on the ellipse then how can I get the normal vector (pointing towards the inner part of the ellipse) at the point $p$?
I have started the following way:
First I should rotate the point $(p_x,p_y)$ such that we are in a coordinate system where the major axis lies on the x-Axis. So the rotated point $p'$ given by:
$$ p' = (x, y) = (p_x\,\cos \phi− p_y\,\sin \phi\,, \,\, p_y\,\cos \phi +p_x\,\sin \phi). $$
Now the question is given that I know the ratio $r=\frac{a}{b}$ how can I find the real value for $a$ and $b$ ?
I can assign an angle $\alpha$ from the ratio of the rectangle given by $x$ and $y$ and then eventually determine the real values for $a$ and $b$:
$$\tan\alpha = \frac{y}{x}$$ $$p'_x = a \cdot \cos \alpha $$ $$p'_y = b \cdot \sin \alpha$$
from which follows:
$$a = \frac{x}{\cos(\arctan(\frac{y}{x}))}$$ $$b = \frac{y}{\sin(\arctan(\frac{y}{x}))}$$
Now that I have the real value for $a$ and $b$ we have:
$$x = a \cdot \cos (\alpha)$$ $$y = b \cdot \sin (\alpha)$$
The vector $t = (- a \cdot \sin \alpha\,,\,b \cdot \cos \alpha )$ (where $\alpha$ is given by = $\arctan(\frac{y}{x})$, and $\arctan$ beeing an inverse trigonometric function) which is given by the derivatives is tangential to the ellipse and points away from the center towards the x-axis. So the normal pointing towards the inner part of the ellipse is given by
$$n=(\,b \cdot \cos \alpha\,,\, - a \cdot \sin \alpha)$$
My primary question is whether the given result is correct. The second question is whether there is a shorter way to obtain the result.