Fit a rotated ellipse around scatter data with constraint I have a bunch of x,y scatter data and I am trying to fit an ellipse through them. I understand there are solutions for the fit where the data points are defined for a full or partial ellipse.
However, in my scenario, I need to add in an additional constraint. The ellipse may be rotated and re-sized, but, the best fit ellipse has to rotate about a pivot which is defined by the rightmost/lowest point. I'll illustrate what I mean by the rightmost/lowest data point in the figure below:

In essence, I believe this would imply that the major axis has to pass through that pivot point. 
What would be the best possible way to incorporate this constraint in the ellipse fitting process? 
Would greatly appreciate any advice, have been shedding hairs over this one. 
Thank you.
 A: The general ellipse with main axes $a,b$ through $(0,0)$ rotated by $\phi$ counterclockwise and with $(0,0)$ on one of its main axis is given by
$$
\begin{multline}
f(x,y; a, b, \phi) =
{\frac { \left( \cos \left( \phi \right) x+\sin \left( \phi \right) y-
a \right) ^{2}}{{a}^{2}}}+{\frac { \left( -\sin \left( \phi \right) x+
\cos \left( \phi \right) y \right) ^{2}}{{b}^{2}}}-1
\end{multline}
$$
So be $(x_0,y_0) = (0,0)$ your pivotal point which can always be achieved by translation.
Now if the points are $(x_i,y_i)$, you have to find $a,b,\phi$ satisfying
$$\sum_i f(x_i,y_i;a,b,\phi)^2 = min!$$
A: Among several ways to solve your problem, I prefer this one :
First, compute the equation of the ellipse on the general form of the quadratic curve :
$$a_{02}y^2+a_{20}x^2+a_{11}xy+a_{01}y+a_{10}x+1=0$$
From scattered experimental points, it can easily be carried out thanks to a regression method. See page 16 of the paper :
https://fr.scribd.com/doc/14819165/Regressions-coniques-quadriques-circulaire-spherique
Second, the parameters of the ellipse are derived with well-known calculus, see :
http://mathworld.wolfram.com/Ellipse.html
Equation (15), center (19-20), semi-axes lenghts (21-22), angle of rotation from the x-axis (23) and so on.
Then, given any pivot point, the equation of the ellipse after rotation can be classically computed. 
Note: if the experimental points are measured in 3-D (in a plane wich equation is not exactly known), see the paper : 
https://fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , 
pages 28-34 which includes a numerical example.
