Build an ellipse given 3 points and the focus

In summary, the conversation is about determining the equation of an ellipse given three points and the focus at (0,0). The first step is to find the total distance (squared) from the focus to the point using the known focus and the unknown focus (a,b). This leads to two equations for a and b. However, using classical geometry, it is possible to set up three equations for a and b, taking into account the symmetry. It is noted that three points on a curve and one focal point may over-specify an ellipse, and that it takes 5 parameters to specify an ellipse but 8 are given. There is some confusion about the number of necessary and sufficient coordinates for each family of curves, with some ideas
  • #1
cptolemy
48
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
  • #2
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 [itex](x- a)^2+ (y- b)^2+ (x-x_0)^2+ (y- y_0)^2[/itex]. Do that for the three given points as (x, y) and set them equal in pairs. That gives two equations for a and b.
 
  • #3
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 [itex](x- a)^2+ (y- b)^2+ (x-x_0)^2+ (y- y_0)^2[/itex]. 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:
  • #4
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.
 
  • #5
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)
 
  • #6
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:
  • #7
Hi,

Thanks to all. Problem solved... :)

Kind regards,

CPtolemy
 
  • #8
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.
 
  • #9
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.
 

1. How do you determine the center of the ellipse?

The center of an ellipse can be found by first finding the midpoint of the two points that form one of the axes of the ellipse. Next, using the distance formula, the distance between this midpoint and the third given point (which lies on the other axis) can be calculated. The intersection of the two axes will be the center of the ellipse.

2. What are the steps for constructing an ellipse given 3 points and the focus?

The steps for constructing an ellipse are as follows:

  1. Plot the three given points on a graph.
  2. Draw a line connecting any two of the points, which will serve as one of the axes of the ellipse.
  3. Using the distance formula, find the distance between the third point and the midpoint of the line segment just drawn.
  4. Draw a perpendicular line from the midpoint to the third point, which will serve as the other axis of the ellipse.
  5. Measure the distance between the two axes and divide it in half. This will be the length of the semi-major axis of the ellipse.
  6. From the center of the ellipse, measure and mark this distance along each axis to create the ellipse.
  7. Plot the focus points on the ellipse, making sure they are the same distance from the center as the semi-major axis.

3. Can an ellipse be constructed with any three points and the focus?

No, an ellipse can only be constructed with three points and the focus if the points lie on the ellipse and the focus points are equidistant from the center of the ellipse. If these conditions are not met, the construction will result in an incorrect ellipse.

4. What is the significance of the focus points in an ellipse?

The focus points play an important role in determining the shape and size of an ellipse. They are equidistant from the center of the ellipse and help to define the major axis of the ellipse. The distance between the focus points and the center is also used to calculate the eccentricity of the ellipse, which determines how elongated or circular the ellipse is.

5. Can an ellipse be constructed using only two points and the focus?

No, an ellipse cannot be constructed with only two points and the focus. At least three points are needed to define the shape and size of an ellipse. If only two points are given, the construction will result in an infinite number of possible ellipses, each with a different eccentricity and shape.

Similar threads

Replies
6
Views
1K
Replies
2
Views
2K
  • General Math
Replies
6
Views
2K
Replies
3
Views
1K
Replies
1
Views
668
Replies
5
Views
3K
  • Introductory Physics Homework Help
Replies
7
Views
1K
  • General Math
Replies
11
Views
5K
  • General Math
Replies
1
Views
6K
Replies
6
Views
2K
Back
Top