# General Elipse

Page Contents

## Standard Elipse

We have seen that the equation fract{~x^2,~a^2} + fract{~y^2,~b^2} _ = _ 1

represents an elipse with its centre at the origin, and its major axis horizontal, i.e. along the ~x-axis. We will call this form the #~{standard elipse}.

So we can say that any equation of the form

_ _ _ _ _ _ ~A ~x^2 + ~B ~y^2 - ~A ~B = 0 , _ _ _ _ _ ~A , ~B > 0

is a standard elipse, where _ ~a = &sqrt.\${~B} , _ and _ ~b = &sqrt.\${~A}

This also means that _ ~A =< ~B _ as _ ~a >= ~b. What we will try to do now is to find the equation of elipses whose center is not at the origin, or whose major axis is not horizontal, or both, i.e. the standard elipse rotated and translated - this is the most general form of the elipse.

Another related question which we would like to answer is: When does a quadratic equation in ~x and ~y represent an elipse, and if so what are the parameters of the elipse (major and minor axes, position and orientation)?

## Rotation

If the standard elipse is rotated through &phi. radians, then the equation of the new curve is:

_ _ _ _ _ _ ~A ( ~x cos &phi. + ~y sin &phi. )^2 + ~B ( - ~x sin &phi. + ~y cos &phi. )^2 - ~A ~B _ = _ 0 , _ _ _ _ _ ~A , ~B > 0

which gives

_ _ _ _ _ _ ( ~A cos^2 &phi. + ~B sin^2 &phi. ) ~x^2 + ( ~B cos^2 &phi. + ~A sin^2 &phi. ) ~y^2 + 2( ~A - ~B ) sin &phi. cos &phi. ~x~y - ~A ~B _ = _ 0

Suppose we have a quadratic equation:

_ _ _ _ _ _ ~P ~x^2 + ~Q ~y^2 + ~R ~x~y + ~S _ = _ 0

Is this an elipse? If we equate the coefficients or the two equations then we can see that

_ _ _ _ _ _ ~P + ~Q _ = _ ~A cos^2 &phi. + ~B sin^2 &phi. + ~B cos^2 &phi. + ~A sin^2 &phi. _ = _ ~A + ~B

_ _ _ _ _ _ ~R _ = _ ( ~A - ~B ) sin 2&phi.

_ _ _ _ _ _ ~S _ = _ -~A~B

Now

_ _ _ _ _ _ ( ~A - ~B )^2 _ = _ ( ~A + ~B )^2 - 4~A~B _ = _ ( ~P + ~Q )^2 + 4~S

[Remember that ~A =< ~B, so we take the negative root.] So:

_ _ _ _ _ _ ~A - ~B _ = _ - &sqrt.\${( ~P + ~Q )&powtwo. + 4~S }

This will only give a real valued solution if _ ( ~P + ~Q )&powtwo. > -4~S , _ which is therefore one condition for the equation representing an elipse. If this is the case then:

_ _ _ _ _ _ 2 ~A _ = _ ( ~A + ~B ) + ( ~A - ~B ) _ = _ ~P + ~Q - &sqrt.\${( ~P + ~Q )&powtwo. + 4~S }

From which we solve for ~A, similarly

_ _ _ _ _ _ 2 ~B _ = _ ( ~A + ~B ) - ( ~A - ~B ) _ = _ ~P + ~Q + &sqrt.\${( ~P + ~Q )&powtwo. + 4~S }

We then solve for &phi.. We restrict &phi. to the range _ 0 =< &phi. =< &pi. _ as rotating the symmetrical elipse through, say, clockwise 80° (i.e. -80°) is the same as rotating anti-clockwise through 110°.

&phi. _ = _ fract{1,2} sin^{-1} rndb{fract{~R,~A - ~B}} _ = _ fract{1,2} sin^{-1} rndb{fract{-~R,&sqrt.\${( ~P + ~Q )&powtwo. + 4~S }}}

This requires that

-1 _ =< _ fract{-~R,2 &sqrt.\${( ~P + ~Q )&powtwo. + 4~S }} _ =< 1

Note, however, sin^{-1}(~m) has, in general, two solutions in the range 0 - 2&pi., i.e. &theta. and &pi. - &theta. (0 =< &theta. =< &pi./2 ). It is necessary to check the solutions to see which one gives the correct value of ~P or ~Q. Furthermore, we solved for ~A and ~B using only values of ~P, ~Q, and ~S. Once we have done this any value of ~R which satisfies the above condition, will give one or two solutions of &phi., so it is necessary to check by calculating the value of ~P or ~Q from this.

For example the elipse with semi-major axis 5 and semi-minor axis 3, rotated through 45° will have an equation

_ _ _ _ _ _ 17 ~x^2 + 17 ~y^2 - 16 ~x~y - 225 _ = _ 0

#{Example} (exercise)

Find the value of ~a, ~b and &phi. (the rotational angle) for the elipse

_ _ _ _ _ _ 21 ~x^2 + 13 ~y^2 - 8 &sqrt.\$3 ~x~y - 225 _ = _ 0 . _ _ [ Note _ 8 &sqrt.\$3 _ ~= _ 13.86 ]

To check your solution you can use the elipse calculator.

## Translation

Suppose we have an elipse of the form:

_ _ _ _ _ _ ~P ~x^2 + ~Q ~y^2 + ~R ~x~y + ~S _ = _ 0

and we wish to shift this ~k units to the right, and ~m units up. The equation of the resulting curve is

_ _ _ _ _ _ ~P ( ~x - ~k )^2 + ~Q ( ~y - ~m )^2 + ~R ( ~x - ~k )( ~y - ~m ) + ~S _ = _ 0

_ _ _ _ _ _ ~P~x^2 + ~Q ~y^2 + ~R~x~y - ( ~R~m + 2~P~k ) ~x - ( ~R~k + 2~Q~m ) ~y + ~S + ~P~k^2 + ~Q ~m^2 + ~R~k~m _ = _ 0

So an for an equation of the form

_ _ _ _ _ _ ~P~x^2 + ~Q ~y^2 + ~R~x~y + ~T~x + ~U~y + ~V _ = _ 0

to be an elipse, we must be able to solve for ~k and ~m using the equations:

_ _ _ _ _ _ 2~P~k + ~R~m _ = _ -~T

_ _ _ _ _ _ ~R~k + 2~Q~m _ = _ -~U

i.e.

matrix{~k/~m} _ = _ script{matrix{2~P,~R/~R,2~Q},,,{-1},} matrix{-~T/{-~U}}

and then solve for ~S:

_ _ _ _ _ _ ~S _ = _ ~V - ~P~k^2 - ~Q ~m^2 - ~R~k~m

and then solve for &phi., ~a and ~b as in the section above (Rotation).

To find the parameters of an elipse with a given equation use elipse calculator 2 .