Equation of ellipse given one axis and another point

In summary: $$\left(\frac{6x + 8y - 25}{25}\right)^2+\left(\frac{3x - 4y - 20}{5b}\right)^2=1 \\ \left(\frac{8x - 6y - 20}{5a}\right)^2+\left(\frac{6x + 8y - 25}{25}\right)^2=1$$... will have no solution because the point doesn't lie on the ellipse.
  • #1
DethLark
9
0
I'm trying to find the equation of a general ellipse given 3 points. Two of those points should be at each end of one axis. Using this I have the center of the ellipse, and the angle of rotation with respect to the x-axis that this axis is rotated. It's unknown whether this is the major or minor axis. The third point is given which can be anywhere on the ellipse. The only other thing to find is the other axis.

This is my attempt. Phi is the angle of rotation of the given mystery axis and abtemp is its size. X(3),Y(3) is the third point. The first equation assumes that the given axis is the major axis and the second assumes it is the minor axis. The problem is that for some of these near 400 ellipses I get negative and imaginary values for the other axes. I'm not sure what's going on here.

tb1 = (-X(3)*sin(phi)+Y(3)*cos(phi)-Ycenter)/sqrt(1-((X(3)*cos(phi)+Y(3)*sin(phi) Xcenter)/abtemp)^2);

ta1 = (X(3)*cos(phi)+Y(3)*sin(phi)-Xcenter)/sqrt(1-((-X(3)*sin(phi)+Y(3)*cos(phi)-Ycenter)/abtemp)^2);
 
Mathematics news on Phys.org
  • #2
Ok, well the sometimes negative values are obviously because of the taking of the square root so the absolute value should be used. I'm still getting what seem to be very incorrect answers. To expand this is how I find the length of the given axis where X(1),Y(1) and X(2),Y(2) are the vertices of the given axis:

abtemp = sqrt((X(2)-X(1))^2+(Y(2)-Y(1))^2)/2;

The center:

Xcenter = (X(1)+X(2))/2;
Ycenter = (Y(1)+Y(2))/2;

And the angle:

adjX = X(2);
adjY = Ycenter;
phi = ((Y(2)-Ycenter)/abs(Y(2)-Ycenter))*acos(sqrt((adjX-Xcenter)^2+(adjY-Ycenter)^2)/abtemp);
 
Last edited:
  • #3
Squinting ... I can just about follow your reaosning.
Lets see if I understand:

You are given three points P1, P2, and P3.
They are at positions ##Pn: \vec r_n=(x_n,y_n)^t:n=1,2,3## ... so all the points are in the same plane.

You also know the standard form for a conic section in a plane - so you can plug the numbers in and solve the simultaneous equations ... using the extra info (ellipse, two points on a principle axis) to help with the solution.

But: You hope for a shortcut by using the extra information at the start - which is fair enough.

From your approach, I am guessing that you are told which of the three points are on the axis, but not which axis it is. Your strategy is to align the coordinate system to the ellipse and exploit a simplified general form for the ellipse equation - then use the inverse transform to get the actual equation?

Just call the semi-axis ##a## - saves typing.
If the first two points are on the axis, then ##a## is half the modulus of the vector difference between their positions. $$2a=|\vec r_{1,2}|=|\vec r_2-\vec r_1|=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$$ ... which you got.

The vector ##\vec r_{1,2}## is the vector pointing from P1 to P2 and it is very useful.
For instance: the angle to the x-axis will just be the argument of ##\vec r_{1,2}## and the center is at ##\vec r_c= \vec r_1 + \frac{1}{2}\vec r_{1,2}##
you did it a different way ... but I don't see any glaring problems. OTOH: I'm not sure I follow your notation either. It sometimes helps to check your answers by applying a different approach.

NOte: it is possible, from the general equation, to get an imaginary ellipse.
http://en.wikipedia.org/wiki/Matrix_representation_of_conic_sections

You can safely eliminate ellipses with negative or imaginary values for properties which, by definition, must be positive and real. The general equations will probably include objects that are not your ellipse: there is more than one shape that could pass through all three points.

You can probably look up the general form of the ellipse with semi-axis ##a## and ##b##, center at ##\vec r_c=(x_0,y_0)## and tilted by angle ##\theta## to the x-axis. Then it's just a matter of plugging the numbers in.
 
Last edited:
  • #4
Thanks for the response. I already have the values you mention. I have one axis, the center, and the angle of rotation of that axis with respect to the x-axis. This only leaves one unknown. The general equation for a rotated and translated ellipse is:

((X*cos(phi)+Y*sin(phi)-Xcenter)/a)^2+((Y*cos(phi)-X*sin(phi)-Ycenter)/b)^2 = 1

I've also attempted to plug in for X and Y my third point which is not connected to an axis. Assume the given axis is for instance the major axis, and iterate values for the minor axis until I find which value gives the closest result to 1. If I assumed incorrectly about which axis the given axis actually is it never gets close to one and I then do the same assuming it is the other. I am able to do this seemingly successfully but the resulting ellipse does not overlap any of the points which doesn't make any sense!

I must be understanding something wrong about the angle or calculating something incorrectly. Either of the methods I've tried should work.
 
Last edited:
  • #5
((X*cos(phi)+Y*sin(phi)-Xcenter)/a)^2+((Y*cos(phi)-X*sin(phi)-Ycenter)/b)^2 = 1

um - that would be... $$\left(\frac{x\cos\phi + y\sin\phi - x_0}{a}\right)^2+\left(\frac{x\cos\phi - y\sin\phi - y_0}{b}\right)^2=1$$
... the main thing to check is if this formula rotates the coordinate axis or the ellipse itself.
Rotating the ellipse by ##\phi## is the same as rotating the axis by ##-\phi##.

I already have the values you mention. I have one axis, the center, and the angle of rotation of that axis with respect to the x-axis. This only leaves one unknown.
Plug the third point into the ellipse and solve for the other axis.
 
Last edited:
  • #6
Worked example:

##P1:\vec r_1=(1,2),\; P2:\vec r_2=(4,6),\; P3:\vec r_3=(3,2)##

Told that ##P1## and ##P2## are on an axis.$$\vec r_{12}=\vec r_2-\vec r_1=(3,4)\\
d=\frac{1}{2}|\vec r_{12}|=2.5$$ ... where d is the semi-length of the axis: this axis is rotated so that: ##\sin\theta = 0.8##, ##\cos\theta = 0.6##

i.e. ##\theta=53.13^\circ## antclockwise from the x axis.
Note: this is the current orientation of the axis - not the amount it has been rotated.

The center is at ##\vec r_c= r_1 + \frac{1}{2}r_{12}=(2.5,4)##

Putting a=2.5 to start with:
In standard orientation, the a axis is aligned with the x-axis ... so the rotation angle is ##\phi=\theta##

$$\left(\frac{(3/5)x + (4/5)y - 2.5}{2.5}\right)^2+\left(\frac{(3/5)x - (4/5)y - 4}{b}\right)^2=1 \\ \Leftrightarrow \left(\frac{6x + 8y - 25}{25}\right)^2+\left(\frac{3x - 4y - 20}{5b}\right)^2=1$$ ... plug in P3 and solve for b.

But what if I'd guessed that the axis is the b axis:
In standard position, the b axis is aligned at ##\theta=+90^\circ## to the x-axis.
That means it must have been rotated ##\phi=90-\theta## clockwise...

Three points should uniquely describe the ellipse in question.
Therefore, one of these two approaches should give nonsense.
Sketch the points out to check - see which orientation makes sense.

Note: does it matter if a is the semi-major axis or not?
 

1. What is the equation of an ellipse given one axis and another point?

The equation of an ellipse can be written in the form (x - h)2 / a2 + (y - k)2 / b2 = 1, where (h, k) is the center of the ellipse, a is the length of the semi-major axis, and b is the length of the semi-minor axis. To find this equation given one axis and another point, we need to plug in the values for the center and the length of the axis into this formula. Then, we can use the given point to solve for the remaining variable.

2. How do you find the center of an ellipse given one axis and another point?

The center of an ellipse is the point (h, k) in the formula (x - h)2 / a2 + (y - k)2 / b2 = 1. To find this point, we can use the given axis and point to create a system of equations. By solving this system, we can determine the values of h and k, which represent the coordinates of the center of the ellipse.

3. Can you find the equation of an ellipse with only one axis and one point?

No, to find the equation of an ellipse, we need to have at least two axes and one point. This is because the equation of an ellipse requires information about the center and the length of both the semi-major and semi-minor axes. With only one axis and one point, we do not have enough information to determine the equation of an ellipse.

4. What is the relationship between the length of an ellipse's axis and its eccentricity?

The eccentricity of an ellipse, represented by the letter e, is a measure of how "squished" or elongated the ellipse is. It is defined as the distance between the center and one of the foci of the ellipse, divided by the length of the semi-major axis. The eccentricity of an ellipse is always between 0 and 1, with a value of 0 representing a circle and a value of 1 representing a line. Therefore, as the length of the axis increases, the eccentricity of the ellipse decreases.

5. What is the difference between an ellipse and a circle?

An ellipse and a circle are both types of conic sections, which are shapes formed by intersecting a cone with a plane. The main difference between the two is that a circle has the same distance from its center to any point on its circumference, while an ellipse has two different distances from its center to the farthest points on its circumference. In other words, a circle has a constant eccentricity of 0, while an ellipse has an eccentricity between 0 and 1.

Similar threads

Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
4
Views
372
Replies
7
Views
1K
Replies
1
Views
2K
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
558
  • General Math
Replies
4
Views
1K
  • Special and General Relativity
Replies
5
Views
357
Replies
1
Views
1K
  • Quantum Physics
Replies
1
Views
226
Back
Top