Sign in to follow this  
Eric_89

Givens: An ellipse, a line and...

Recommended Posts

Givens: An ellipse, a line and a point on it. Question: Find a position for ellipse so it touches the point and doesn’t cross the line. (Preferably pseudo code style solution) Thanks,

Share this post


Link to post
Share on other sites
Quote:
Original post by Eric_89
Givens: An ellipse, a line and a point on it.
Question: Find a position for ellipse so it touches the point and doesn’t cross the line.
(Preferably pseudo code style solution)
Thanks,
What problem are you trying to solve exactly? Can you give us some information about the context?

Share this post


Link to post
Share on other sites
Quote:
What problem are you trying to solve exactly? Can you give us some information about the context?


I wrote the simplified version of problem.
The original question is: we have a circle and an ellipse. Find positions of ellipse so it touches the circle but not crossing it. (and no rotations)

So for example: If we have teta an angle of circle. where would be the ellipse?

Share this post


Link to post
Share on other sites
Quote:
Original post by Eric_89
Quote:
What problem are you trying to solve exactly? Can you give us some information about the context?


I wrote the simplified version of problem.
The original question is: we have a circle and an ellipse. Find positions of ellipse so it touches the circle but not crossing it. (and no rotations)

So for example: If we have teta an angle of circle. where would be the ellipse?
Is this a homework problem? If so, be sure to check the forum FAQ (specifically what it has to say about asking homework questions on the forums).

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
Quote:
Original post by Eric_89
Quote:
What problem are you trying to solve exactly? Can you give us some information about the context?


I wrote the simplified version of problem.
The original question is: we have a circle and an ellipse. Find positions of ellipse so it touches the circle but not crossing it. (and no rotations)

So for example: If we have teta an angle of circle. where would be the ellipse?
Is this a homework problem? If so, be sure to check the forum FAQ (specifically what it has to say about asking homework questions on the forums).


no its not homework.. what kind of homework is that??

Share this post


Link to post
Share on other sites
Quote:
Original post by szecs
Try to look into the attributes of ellipses (Wiki will help).
But you can use the equations of the shapes: the equations, and the first derivates (tangent) should be equal at that point.


yes.. but how do we know at which point we should get tangent?

Share this post


Link to post
Share on other sites
Quote:
Original post by Eric_89
(so if someone writes a clean question.. y think its homework? would y rather I write here a full page of my problems in geometries of my game?)
Sorry, we are used to this typical behavior: First post at Gamedev, no "hello/hi"/something, just you post a question.

But again: you could try to work with the equation of the ellipse and the derivate of it (since you know the tangent o the ellipse), joust like you asked in the first post (line with point).
2 equations -> 2 coordinates

Share this post


Link to post
Share on other sites
Quote:
(so if someone writes a clean question.. y think its homework? would y rather I write here a full page of my problems in geometries of my game?)
There's no need for a full page; a brief description of the actual problem you're trying to solve would suffice.

To me, the way you've stated the problem makes it sound like a homework question. If it's not, I apologize - it's just that on these forums we usually try to give considered answers to homework questions, so it can be useful to know, in some cases, whether a question is or is not a homework question.

Is there any particular reason you can't tell us a little about the problem you're trying to solve? That would make it easier to help.

Share this post


Link to post
Share on other sites
I think the question you are asking a little more complex than you realize, and I need some more information.

Is there are specific radius of the circle that you would like? If you don't care than you can place a circle with a radius of half the semi-major axis of the ellipse at the center foci of the ellipse. The circle at this point would only intersect the ellipse twice.

If you wanted more intersection with the ellipse or wanted it a different foci, you could use the polar equation for the ellipse and set it equal to the equation for a circle. This is assuming you know where you want the center of the circle to be.

Oh and a foci is kind of like the "centers" for an ellipse. There are three of them, one in the dead center and the other two are close to the ends of the ellipse, but their exact location depends on the shape of the ellipse desired.

Share this post


Link to post
Share on other sites
He said he solved it.
I think the radius and position of the circle, and the 2 axis of the ellipse (I guess they are aligned to the CS axis), and the touching point on the circle (by angle or whatever) were given. (what the hell is the plural form of "axis"?)
Question was the position of the ellipse touching the circle.
But dunno if it's interesting to the poster, if they are touching from outsides, or one is inside the other.
But he said he solved it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this