\(\theta\) = Counter Clockwize Rotation Angle from Positive \(X\) Axis
\((x_c,y_c)\) = Coordinates of the Center of Ellipse
\(a\) = Length of Semi-Major Axis of Ellipse
\(b\) = Length of Semi-Minor Axis of Ellipse
Following are the Steps to Find the Parameters of an Arbitrarily Rotated and Translated Ellipse as given by equation (1) above
Determine whether the equation (1) actually represents an Ellipse (Real or Imaginary) by Calculating the Determinant of \(E\) Matrix and the \(e\) Matrix.
Equation (1) represents an Ellipse only if the Determinant of \(E\) Matrix is Non-Zero and the Determinant of \(e\) Matrix is \(> 0\).
Translate the Equation of Ellipse as given in equation (1) by \((-x_c,-y_c)\) so that the Center of the Ellipse comes to lie at the Origin.
This will get rid of the \(x\) and the \(y\) terms of the equation of the Ellipse as given below
The equation (4) above gives the Equation of the Rotated Ellipse (Real or Imaginary) having Center at the Origin where
\(Ax^2 + Bxy + Cy^2 - a^2b^2=0\) (Equation of the Rotated Real Ellipse having Center at the Origin)...(5)
\(Ax^2 + Bxy + Cy^2 + a^2b^2=0\) (Equation of the Rotated Imaginary Ellipse having Center at the Origin)...(6)
For Real Ellipse the Angle of Rotation \(\theta\) is determined as follows
Dividing equation (5) above by \(a^2b^2\) we get
\(\frac{A}{a^2b^2}x^2 + \frac{B}{a^2b^2}xy + \frac{C}{a^2b^2}y^2 - 1=0\) (Normalized Equation of the Rotated Real Ellipse having Center at the Origin)...(7)
Setting \(\frac{A}{a^2b^2} = \mathbf{A_1}\), \(\frac{B}{a^2b^2} = \mathbf{B_1}\) and \(\frac{C}{a^2b^2} = \mathbf{C_1}\) in equation (7) above we get
\(A_1x^2 + B_1xy + C_1y^2 - 1=0\) ...(8)
Using the values of \(A\), \(B\) and \(C\) from equation (1) above calculate \(C_1-A_1\) as
The \(m\_arctan2\) is the Modified Arctangent Function, which calculates the angle \(2\theta\) such that \(0 \leq 2\theta < 2\pi\),
so that the Angle \(\theta\) obtained above is such that \(0 \leq \theta < \pi\).
For Imaginary Ellipse the Angle of Rotation \(\theta\) is determined as follows
Dividing equation (6) above by \(-a^2b^2\) we get
\(\frac{A}{-a^2b^2}x^2 + \frac{B}{-a^2b^2}xy + \frac{C}{-a^2b^2}y^2 - 1=0\) (Normalized Equation of the Rotated Imaginary Ellipse having Center at the Origin)...(12)
Setting \(\frac{A}{-a^2b^2} = \mathbf{A_1}\), \(\frac{B}{-a^2b^2} = \mathbf{B_1}\) and \(\frac{C}{-a^2b^2} = \mathbf{C_1}\) in equation (12) above we get
\(A_1x^2 + B_1xy + C_1y^2 - 1=0\) ...(13)
Using the values of \(A\), \(B\) and \(C\) from equation (1) above calculate \(A_1-C_1\) as
The \(m\_arctan2\) is the Modified Arctangent Function, which calculates the angle \(2\theta\) such that \(0 \leq 2\theta < 2\pi\),
so that the Angle \(\theta\) obtained above is such that \(0 \leq \theta < \pi\).
Rotate the Equation of Ellipse as given in equation (4) by Angle \(\theta\) Clockwize. This will get rid of the \(xy\) term of the equation of Ellipse and convert it into an Axis Aligned \(X\)-Major Ellipse as given below
The equation (19) above gives the Standard Coordinate Equation of \(X\)-Major Ellipse corresponding to the Ellipse as given in equation (1).
In order to obtain a Standard Coordinate Equation of \(Y\)-Major Ellipse, the equation (4) must be Rotated by Angle \(\phi=(\theta + 90^\circ) \mod 180^\circ \) Clockwize.
Once the Standard Coordinate Equation of \(X\)-Major Ellipse is found, it's Parameters can be calculated as given below.
Length of Semi-Major Axis: \(a\)
Length of Major Axis: \(L=2a\)
Length of Semi-Minor Axis: \(b\)
Length of Minor Axis: \(l=2b\)
Length for Latus Rectum : \({LR}_d=\frac{l^2}{L}=\frac{2b^2}{a}\)
Distance Between 2 Foci: \(F=\sqrt{L^2-l^2}=2c=2\sqrt{a^2-b^2}\)
Distance of Directrices from the Center : \(D=\frac{L^2}{2F}=\frac{a^2}{c}\)
Coordinates of the Center: \((x_c,y_c)\)=\((\frac{BE-2CD}{4AC-B^2},\frac{BD-2AE}{4AC-B^2})\)
Coordinates of the 2 Vertices : \((x_{v1},y_{v1})=(x_c + a\cos\theta,y_c + a\sin\theta),\hspace{.3cm}(x_{v2},y_{v2})=(x_c - a\cos\theta,y_c- a\sin\theta)\)
Coordinates of the 2 Co-Vertices : \((x_{cv1},y_{cv1})=(x_c - b\sin\theta,y_c + b\cos\theta),\hspace{.3cm}(x_{cv2},y_{cv2})=(x_c + b\sin\theta,y_c- b\cos\theta)\)
Coordinates of the 2 Foci : \((x_{f1},y_{f1})=(x_c + c\cos\theta,y_c + c\sin\theta),\hspace{.3cm}(x_{f2},y_{f2})=(x_c - c\cos\theta,y_c- c\sin\theta)\)
Coordinates of Points of Intersection of Directrix-1 and Major Axis: \((x_{d1},y_{d1})=(x_c+D\cos\theta,y_c+D\sin\theta)\)
Coordinates of Points of Intersection of Directrix-2 and Major Axis: \((x_{d2},y_{d2})=(x_c-D\cos\theta,y_c-D\sin\theta)\)
Coordinates of Points of Intersection of Latus Rectum-1 and Ellipse: \((x_{f1}-\frac{{LR}_d}{2}\sin\theta,y_{f1}+\frac{{LR}_d}{2}\cos\theta)\),\((x_{f1}+\frac{{LR}_d}{2}\sin\theta,y_{f1}-\frac{{LR}_d}{2}\cos\theta)\)
Coordinates of Points of Intersection of Latus Rectum-2 and Ellipse: \((x_{f2}-\frac{{LR}_d}{2}\sin\theta,y_{f2}+\frac{{LR}_d}{2}\cos\theta)\),\((x_{f2}+\frac{{LR}_d}{2}\sin\theta,y_{f2}-\frac{{LR}_d}{2}\cos\theta)\)
Equation of Major Axis : \(x\sin\theta - y \cos\theta -x_c\sin\theta + y_c \cos\theta=0\)
Equation of Minor Axis : \(x\cos\theta + y \sin\theta -x_c\cos\theta - y_c \sin\theta=0\)
Equation of 2 Directrices : \(x\cos\theta + y \sin\theta -x_{d1}\cos\theta - y_{d1}\sin\theta=0,\hspace{.3cm}x\cos\theta + y \sin\theta -x_{d2}\cos\theta - y_{d2}\sin\theta=0\)
Equation of 2 Latus Recta : \(x\cos\theta + y \sin\theta -x_{f1}\cos\theta - y_{f1} \sin\theta=0,\hspace{.3cm}x\cos\theta + y \sin\theta -x_{f2}\cos\theta - y_{f2}\sin\theta=0\)