So I'm trying to find the best ellipse that fits with a sample data, that is an easy task if the ellipses fallow the standard form: $$r = \frac{b}{\sqrt{- e^{2} \cos^{2}{\left(θ \right)} + 1}}$$
But when I transform my data from cartesian coordinates to polar coordinates, my data will not always be close to an ellipse as standardized as this one. I need to include a variable responsible to translation $(r_0)$ and one responsible to rotation of the axis $(\theta_0)$. Thus, by obtaining these variables, I can calculate the variational of the residual of my function $r(\theta)$ relative to them, in such a way that I optimize the residual $(data sample - approximation\ function)$. I don't know what is the "general" elliptic equation (which includes translation and rotation) in polar coordinates. I searched for this equation a lot and I tried to find it by myself but I didn't succeed. Does anyone know it?
Concerning the translation you have better to deduct $x_0, y_0$ from the "points" coordinates.
For the rotation you add a $\theta _0$ to $\theta$.