Ellipse inside a circle - intersection

In summary, the conversation discusses a geometry problem involving a non-rotated ellipse inside a circle. The goal is to find the y coordinate of the vertical point of intersection between the two shapes. One potential solution is provided through a link to a MathWorld page, but it requires solving a degree 4 polynomial equation. Other suggestions are made, including using Mathematica or an iterative zero finding approach. A solution from WolframAlpha is also suggested, but it produces a complicated expression. The conversation concludes with a request for help simplifying the expression.
  • #1
Andromedus
6
0
Hi everyone. I hope I've found the right place for my first post here. I have a geometry problem which I need to solve for a piece of software I'm writing, and I'm hoping someone might be able to help me.

I have a non-rotated ellipse inside a circle, as in this diagram. I know the x and y coordinates for the centres of both the circle and the ellipse, and I know the radius of the circle and the width and height (major and minor axis) of the ellipse. This is also a special case of circle-ellipse intersection, in that the edges of the ellipse just touch the inside of the circle to form two tangents, both at the same height above the x-axis.

http://andromedus.com/misc/ellipse.jpg

What I need to find out is the y coordinate of P, the vertical point of intersection.

I have found this page: http://mathworld.wolfram.com/Circle-EllipseIntersection.html which goes some way to helping me, but unfortunately I don't know get from there to a single equation in terms of the value I need to calculate - the vertical point of intersection.

Any help is much appreciated - thanks! :)
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
If you try to solve (1) and (2) simultaneously (for y, say), what you will end up getting most of the time is a degree 4 polynomial equation. While it is possible to write down a formula for the roots, the general formula is very messy. The quartic polynomial in question is

Code:
(-2*b^2*a^2+b^4+a^4)*y^4+(4*b^2*a^2*w-4*a^4*w)*y^3+(2*b^2*r^2*a^2-2*b^2*a^2*w^2+2*b^2*z^2*a^2+2*ab^2*b^2+6*a^4*w^2-2*b^4*z^2-2*b^4*r^2-2*ab^2*a^2+4*z)*y^2+(4*ab^2*a^2*w-4*b^2*r^2*a^2*w-4*b^2*z^2*a^2*w^4*a^4*w^3)*y+2*b^2*r^2*a^2*w^2+2*b^2*z^2*a^2*w^2-2*ab^2*a^2*w^2-2*ab^2*b^2*r^2-2*ab^2*b^2*z^2+2*b^4*r^2*z^2+ab^4+b^4*r^4+b^4*z^4+a^4*w^4-4*z*r^2

(according to Maple). Here I'm assuming that the circle is centered at (0,0) (we can always make this assumption and translate later) and that the ellipse is centered at (z,w). The rest of the notation is just as in the MathWorld link.

Unfortunately, Maple couldn't spit out a formula for the roots. If you have Mathematica or some other such software, you might have better luck.
 
  • #3
Thanks morphism. Wow, that looks pretty nasty! I am downloading the trial of Mathematica, so I'll see if can give me the solutions to that. If it can't, then I guess I'm really stuck.
 
  • #5
Thanks Filip. I've given that a try and it has produced some solutions which I will now try integrating into my code. I didn't expect this to get quite so complicated!
 
  • #6
I was going to suggest that you perhaps could use an iterative zero finding approach like Newton-Raphson [1] on a function f defined as the radial distance (with sign) between the ellipse and the circle, but it seems that calculating the value of f(y)/f'(y) [2] is going to be just as complicated as calculating the "exact" solution directly.

Edit: seems I was a bit too quick on the trigger there. Defining f as the difference between the squares of the radial distance of the ellipse and circle simplifies the expression for f(y)/f'(y) quite a bit with common sub-expression, perhaps even enough to make it a useful alternative for you.

[1] http://en.wikipedia.org/wiki/Newton's_method[/SUB]
[2] http://www.wolframalpha.com/input/?i=f+/+(df/dy)+for+f+=+y^2+++a^2(1-(y-w)^2/b^2)+-+r^2
 
Last edited:
  • #7
Filip - I'm not quite sure what I'm looking at there - is the first result the x value of the intersect point? I'm afraid this is going a little over my head.
 
  • #8
Thinking about it I must admit that I do not think you will be able to benefit from using Newton-Raphson in this case. I forgot that you want the ellipse to be tangent to the circle and not just to intersect it, so please just ignore my suggestion about using Newton-Raphson.

(And even if you just wanted to find the intersection, the function f as it is written in [2] in my previous post is not quite right, so that is another reason to ignore that post :smile:).
 
  • #9
I would like to add a few comments to the solution in post #4. The output from WolframAlpha lists several solutions. If you let the ellipse slide up the y-axis with its center on (0, w), then for small values of w there will be no intersections between the ellipse and the circle. As w increase, the ellipse will eventually for a single value w = w1 just touch the circle (as on your drawing) and there will be exactly to intersections between the circle and the ellipse. This is the first solution listed by WolframAlpha in post #4. When w is increase above w1 there will now be 4 intersections and these are the second and third solution in the output.

So, given that you have a circle of radius r and center in coordinate (0,0), and an ellipse with major axis a, minor axis b, and center at coordinate (0,w), where 0 < ba < r and 0 < w < r-b, there is exactly one value of w where the two are tangential to each other, namely when

[tex]w = w_1 = \sqrt{(1-b^2/a^2)(r^2-a^2)}[/tex]

With this value of w you can then calculate, say, the positive x value of the intersection point using the first expression for x in the output and from that x-value the corresponding y value. I must admit it is a complicated expression, but it looks like it can be simplified a bit using common sub-expressions. Unfortunately I have not been able to nudge WolframAlpha into providing a nicer expression than the given one so if anyone here are able to do that then please post a link.
 
  • #10
Thank you Filip for your help.

I've found a solution to this problem now which was given to me by someone on mathnerds.org, who suggested equating gradients - ie the gradient of the circle and the gradient of the ellipse are the same at the point they touch, so by differentiating and equating we ended up with a very simple expression for y, the vertical intersect point:

y = w / (1 - (b^2 / a^2))

Plugging that into my program verifies that it works.

Thanks to all for helping. :)
 
  • #11
Nice work!

Just so I understand: is the w you use in that equation same as the w I mention in post #9? If so, you can also write the y-value for the tangential point as

[tex]y_t = \sqrt{\frac{r^2-a^2}{1-b^2/a^2}}[/tex]
 
  • #12
Yes, the ellipse is positioned with its centre at (0,w).

That's a nice way to express it in terms of just r, a and b. :)
 
  • #13
Ah - I hadn't realized that your ellipses were always centered at (0,w) and that you always wanted tangency. That does simplify matters a lot.
 

1. What is an ellipse inside a circle?

An ellipse inside a circle refers to a geometric shape where an ellipse is completely contained within a circle. The ellipse will touch the circle at two points, known as the intersection points.

2. How do you find the intersection points of an ellipse inside a circle?

The intersection points can be found by solving the equations of the ellipse and circle simultaneously. This can be done using algebraic methods or by graphing the two equations and finding the points of intersection.

3. Can an ellipse inside a circle have more than two intersection points?

No, an ellipse inside a circle can only have two intersection points. This is because the ellipse is completely contained within the circle, and the two shapes can only intersect at two points at most.

4. What are the properties of the intersection points of an ellipse inside a circle?

The intersection points of an ellipse inside a circle have the same coordinates as the foci of the ellipse. This means that the distance from each intersection point to the center of the circle is the same as the distance from each intersection point to the foci of the ellipse.

5. How are ellipse-circles used in real life?

Ellipse-circles are used in various applications, such as in engineering and architecture, to create aesthetically pleasing and symmetrical shapes. They can also be used in mathematics to solve complex geometric problems and in physics to model the orbits of planets and satellites.

Similar threads

Replies
4
Views
793
Replies
9
Views
803
  • Differential Geometry
Replies
4
Views
3K
  • Differential Geometry
Replies
1
Views
2K
  • Differential Geometry
Replies
8
Views
3K
Replies
2
Views
269
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
11
Views
2K
Replies
4
Views
3K
Replies
2
Views
1K
Back
Top