# 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 on other sites
Quote:
 Original post by Eric_89Givens: 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 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 on other sites
Had you tried using a sheet of paper and a pen to solve the problem before you asked us to give you pseudo code?

##### 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 on other sites
Quote:
 Original post by szecsHad you tried using a sheet of paper and a pen to solve the problem before you asked us to give you pseudo code?

yes.. but I'm a little confused..

##### 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 on other sites
(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?)

##### Share on other sites
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.

##### Share on other sites
Quote:
 Original post by szecsTry 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 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 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 on other sites
o wait.. I got it.. I got it.. :)
tnx szecs..

##### Share on other sites
Quote:
 Sorry, we are used to this typical behavior: First post at Gamedev, no "hello/hi"/something, just you post a question.

sorry yea. hi how y do.. :)

##### 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 on other sites
I don't understand the problem either. A picture would be nice.

##### 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 on other sites
Quote:
 Original post by szecsHe said he solved it.

I didn't understand that.

Quote:
 (what the hell is the plural form of "axis"?)

"Axes".

##### Share on other sites
Quote:
 Original post by alvaro"Axes".
That was my guess, thank you.
Same as the plural of "axe"?

Yup.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628354
• Total Posts
2982229

• 10
• 9
• 11
• 24
• 11