# Thread: roundest ellipse through 4 points

1. ## roundest ellipse through 4 points

Hello, New to this forum. First post. I thought I'd find the answer to this by Googling, but haven't! Anyway, the problem is to find the ellipse through 4 given points (or two points and the tangents at those points) that is the roundest, that is |a - b| is a minimum, where a and b are the major and minor axis. We can assume each given point lies outside the triangle formed by the other 3, not sure if that's any real help, but I believe it's necessary for an ellipse through the 4 points to exist (I think it might be sufficient, but have no proof as yet). Any ideas, or a solution, or have I missed it in your geometry section (I did take a quick look)? Thanks, Louis.

2. ## Re: roundest ellipse through 4 points

Hey LouisLavery.

You are in effect solving an optimization problem. Since x^2 preserves the topological aspects, you can solve the same problem by optimizing (a-b)^2 is a minimum.

To start off you need to begin with a system of four equations in four unknowns. This will start you off in solving the problem.\

After this, it is a matter of using standard optimization techniques (if you can represent a-b as a separate variable then you can use this variable related to other variables and find a minimum in a multi-variable domain).

3. ## Re: roundest ellipse through 4 points

This gives my ideas. I have not worked out any of them very far, but perhaps they will be helpful.

Because the topological characteristics of the ellipse are not changed by changing the orientation of the axes or the location of the origin, it may simplify the mechanics to draw a line between two of the four points, to call that line the x-axis, and to make one of the points on that line the origin.

I have not worked what the necessary conditions are for four distinct points to define an ellipse, but any four points will not do. Think for example of four co-linear points. You may well need to specify those conditions algebraically to solve the problem.

If, however, the four points do define one or more ellipses, then you can use that to set up a system of equations. For example, if the four points are

(0, 0), (0, a), (b, c), and (d, e), then a, b, c, d, and e are constants not variables. Furthermore, the sum of the distances from a point on the ellipse to the two unknown foci is the same for every point. Let (p, q) and (r, s) be the foci; they are unknowns.

Then you get

$\sqrt{(p - 0)^2 + (q - 0)^2} + \sqrt{(r - 0)^2 + (s - 0)^2}= t =$ the unknown sum of the distances from a point on the ellipse to the foci.

$\sqrt{(p - 0)^2 + (q - a)^2} + \sqrt{(r - 0)^2 + (s - a)^2}= t.$

$\sqrt{(p - b)^2 + (q - c)^2} + \sqrt{(r - b)^2 + (s - c)^2}= t.$

$\sqrt{(p - d)^2 + (q - e)^2} + \sqrt{(r - d)^2 + (s - e)^2}= t.$

This is ugly with five unknowns and only four equations and squares and square roots. It gives me a headache to look at it. But I presume (not that I have tried it) that you can derive a differentiable function in only one unknown for the distance between the foci. If so, just find the minimum (remembering to check the boundary condition that the distance between the foci cannot be less than zero.)

I know this is sort of vague (and it may be a dead end). But I did want to give you the result of my musings. Hope they help.

4. ## Re: roundest ellipse through 4 points

Fattest (least eccentric) ellipse (conic) through 4 points:

Label the 4 points p0,p1,p2,p3 anticlockwise around the quadrilateral.

Define 3 vectors
w1 = p1 - p0 = (x1,y1)
w2 = p2 - p0 = (x2,y2)
w3 = p3 - p0 = (x3,y3)

and their cross products[1]
a = w2 x w3
b = w3 x w1
c = w1 x w2

let m = a*y1^2 + b*y2^2 + c*y3^2
and n = a*x1^2 + b*x2^2 + c*x3^2

A = n-m
C = n+m
B = 2[a*x1*y1 + b*x2*y2 + c*x3*y3]

The fattest ellipse has eccentricity e where...

e^2 = 2|C| / [|C| + sqrt(A^2 + B^2)] where |C| is C's absolute value

...if A^2 + B^2 < C^2 then there are no ellipses, only hyperbolas, and the above gives the least eccentric of those. So the above gives the least e^2 of the conics through the points.

[1] w1 x w2 = x1*y2 - x2*y1 etc

Sorry, not got round to writing out a tidy proof, yet.

5. ## Re: roundest ellipse through 4 points

Making (a-b)^2 a minimum is similar to minimizing the eccentricity, but not exactly the same. In 100 Great problems of Mathematics, Their History and Solution, Dover Publications, Inc., Dörrie presents Steiner's nice characterization of the ellipse of circumscription which has minimal eccentricity, which he calls the most nearly circular ellipse. If anyone is interested, I wrote a paper related to this: 5. “Ellipses of minimal area and of minimal eccentricity circumscribed about a convex quadrilateral”, Australian Journal of Mathematical Analysis and Applications, Volume 7, Issue 1, Article 8(2010). The details are too much to give here, but I can say that it involves the unique pair of conjugate directions that belong to all ellipses which pass through the vertices of a convex quadrilateral.