Build an ellipse given 3 points and the focus

Click For Summary

Discussion Overview

The discussion revolves around the challenge of constructing an ellipse given three points and one focus, specifically focusing on the mathematical formulation and potential solutions. Participants explore the theoretical underpinnings, equations involved, and the implications of the parameters required to define an ellipse.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests determining the equation of the ellipse by using the distances from the known focus to the three given points, leading to a system of equations for the unknown focus.
  • Another participant proposes that the problem may be over-specified, noting that typically five parameters are needed to define an ellipse, while eight parameters are provided in this case.
  • Some participants discuss the general homogeneous quadratic equation for conics, highlighting the relationship between the number of independent parameters and the ability to define a conic section.
  • There is a suggestion that classical geometry could provide a solution through square-root-free equations, involving hyperbolas defined by the distances between the points and foci.
  • One participant reflects on the nature of defining curves in higher dimensions, questioning how the number of parameters relates to the dimensionality of the space.
  • Another participant expresses confusion regarding the necessary and sufficient conditions for defining curves, particularly in relation to the number of points and parameters involved.

Areas of Agreement / Disagreement

Participants express differing views on the sufficiency of the given parameters to define an ellipse. While some believe the problem is over-specified, others explore various mathematical approaches without reaching a consensus on the feasibility of constructing the ellipse.

Contextual Notes

Participants note the complexity of the problem, including the dependence on the definitions of parameters and the implications of dimensionality in the context of conic sections.

cptolemy
Messages
45
Reaction score
1
Hi,

I'm trying to write a C program to build an ellipse given 3 points and the focus equals to (0,0); can someone help me out?

Regards,

CPtolemy
 
Mathematics news on Phys.org
The first thing you should do, before writing the program, is determine the equation of the ellipse. Let (a,b) be the unknown focus. Then the total distance (squared) from that focus to the point (x,y) to the known focus (x0, y0) is (x- a)^2+ (y- b)^2+ (x-x_0)^2+ (y- y_0)^2. Do that for the three given points as (x, y) and set them equal in pairs. That gives two equations for a and b.
 
HallsofIvy said:
The first thing you should do, before writing the program, is determine the equation of the ellipse. Let (a,b) be the unknown focus. Then the total distance (squared) from that focus to the point (x,y) to the known focus (x0, y0) is (x- a)^2+ (y- b)^2+ (x-x_0)^2+ (y- y_0)^2. Do that for the three given points as (x, y) and set them equal in pairs. That gives two equations for a and b.

I think the Halls's equations are more horrible than that, because "distance (squared)" should actually be "distance" so you get the sum of two square roots.

However you can solve this by "classical" geometry that translates into square-root-free equations.

Call the known focus F and the unknown one G, and the three points P Q and R.
Then from the properties of an ellipse,
The distances FP + PG = FQ + QG = FR + RG.

So
PG - QG = FQ - FP
Which says that G lies of a hyperbola with foci P and Q and a known eccentricity (fixed by the distances PQ and FQ-FP)
.
Similarly G lies on two other hyperbolas with equations
QG - RG = FR - FQ
and
RG - PG = FP - FR

You can set up the equations of these hyperbolas in the standard quadratic form and solve them for the position of G. It may be easier to use all three equations to take advantage of the symmetry, rather than work with just two of them.
 
Last edited:
Somehow it seems thee points on the curve plus one focal point over-specify an ellipse; that is, there usually won't be a solution. Is that right? It seems to take 5 parameters to specify an ellipse, but eight are given.
 
Phrak said:
Somehow it seems thee points on the curve plus one focal point over-specify an ellipse; that is, there usually won't be a solution. Is that right? It seems to take 5 parameters to specify an ellipse, but eight are given.

That seems to be the case. If you write the general homogeneous quadratic equation
ax^2 + 2hxy + bc^2 + 2gx + 2fy + c = 0

You only have 5 independent parameters out of the 6 a,b,c,f,g,h, to determine ANY conic.

For this problem you have 3 unknown parameters, the x,y coordinates of the other focus, and the eccentricity.

On the other hand, you can always draw a circle through 3 points (if you count a straight line as a circle with infinite radius) but 3 points have 6 independent parameters not 5. So counting the number of independent variables is not as simple as it would be if all the equations were linear :confused:

I seem to remember a theorem that you can draw a conic through any set of 5 points. But 5 points is 10 independent parameters, not 5 :confused: :confused: :confused:

(Clearly all the points must be coplanar for any of this to be interesting)
 
I share your confusion. Something very interesting is going on. There must be some way to determine the number of necessary and sufficient coordinates for each family of curves.

Here's one idea in my attempt to make sense of things. Take the simplest example, a straight line specified by 2 points or 4 coordinates, but where y=mx+b has only 2 constant parameters.

So instead, consider a straight line in N dimensions, parametric in λ.

x = aλ+p
y = bλ+q
z = cλ+r
...

The line can be described by two points each with N coordinates or 2N constant parameters, so in this case the (constant) parameter count is equal.

This is more than only a line in N space, but a curve with an origin at (p,q,r). (not to be confused with the coordinate origin) I'm curious as to whether this could make the difference in constant parameter count in the more general case. There may also be something interesting with afine transform of the variable λ, φ=αλ+β --or maybe not.
 
Last edited:
Hi,

Thanks to all. Problem solved... :)

Kind regards,

CPtolemy
 
Phrak said:
Here's one idea in my attempt to make sense of things. Take the simplest example, a straight line specified by 2 points or 4 coordinates, but where y=mx+b has only 2 constant parameters.

So instead, consider a straight line in N dimensions, parametric in λ.

x = aλ+p
y = bλ+q
z = cλ+r
...

The line can be described by two points each with N coordinates or 2N constant parameters, so in this case the (constant) parameter count is equal.

This is more than only a line in N space, but a curve with an origin at (p,q,r). (not to be confused with the coordinate origin) I'm curious as to whether this could make the difference in constant parameter count in the more general case. There may also be something interesting with afine transform of the variable λ, φ=αλ+β --or maybe not.

I think one way to resolve this is to consider the curve as a set of points, not as an "equation". The set of points on straight line (in any number of dimenensions) can be described by 2 points, i.e. the set {P | there exists λ s.t. P = P_1 + λ P_2 }

Then, the fact that in R^n you can reduce this to a set of n-1 equations with apparently fewer independent parameters (e.g. y = mx + c in R^2) is because the definition of the set involves a linear function of λ.

Similarly you can define the set of points on any circle in R^n for any n using two points, which define a vector of length equal to the radius, from the center, normal to the plane of the circle. Proving that that you can draw a circle through any 3 non-collinear points is then an exercise in vector algebra. (I'm not sure if the fact that this definition only works in R^2 if you consider R^2 as a subspace of R^3 is "interesting", or not...)

One would hope there is a sub-branch of math where this stuff has been sorted out already.
 
AlephZero said:
I think the Halls's equations are more horrible than that, because "distance (squared)" should actually be "distance" so you get the sum of two square roots.
You are right. I started by thinking that the total distances were equal and that therefore the distances squared would be equal but the total distace is, of course, the sum of two square roots and its square would still involve a square root.

However you can solve this by "classical" geometry that translates into square-root-free equations.

Call the known focus F and the unknown one G, and the three points P Q and R.
Then from the properties of an ellipse,
The distances FP + PG = FQ + QG = FR + RG.

So
PG - QG = FQ - FP
Which says that G lies of a hyperbola with foci P and Q and a known eccentricity (fixed by the distances PQ and FQ-FP)
.
Similarly G lies on two other hyperbolas with equations
QG - RG = FR - FQ
and
RG - PG = FP - FR

You can set up the equations of these hyperbolas in the standard quadratic form and solve them for the position of G. It may be easier to use all three equations to take advantage of the symmetry, rather than work with just two of them.
Nice.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 11 ·
Replies
11
Views
8K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K