Ellipse through 4 points

(from Didactic hints)


In a Cartesian plane xOy an equation with form

Eqn001.gif

represents an ellipse with axes parallel to the Cartesian axes, center C(α;β) and semiaxes a e b.

The denominators in (1) are intrinsically positive. To simplify the notation and the calculation we represent them with positive parameters

Eqn002.gif

and rewrite the equation in the following way

Eqn003.gif

Since in equation (3) there are four parameters (p, q, α, β ), four independent conditions are sufficient to completely determine the equation of the ellipse.

In particular, given four unaligned points P, Q, R, S:

Eqn004.gif

the equation of the ellipse through the four points can be determined by imposing that their coordinates satisfy the equation (3), that is, by solving the system

Eqn005.gif

The resolution of the system can be made easier if we observe that, by subtracting side to side the second equation from the first one, we get

Eqn006.gif

To obtain a linear form, in the equation (5) we set

Eqn007.gif

then

Eqn008.gif

The same procedure can be applied to any other pair of equations of the system (4), obtaining, for example,

Eqn009.gif

The system (8) allows you to express p, q, u and, consequently, also α and β, as functions of v. By substituting these expressions in any of the equations of the system (4), we can determine v and then the values of p, q, α and β.

The following Javascript application automates the solution of the problem. If the coordinates of the points are rational (ie do not contain the decimal point, but can contain a slash), also the parameters a, b, α and β are expressed by rational numbers.

The applet calculates equation, center and semiaxes and can produce the graph of the ellipse.

 

 


last revision: September 2018