Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is what I know:

The location of the center of the ellipse C (20,10).
The Major axis (2a) or 400 (a being 200) - this is on the X axis.
The Minor axis (2b) or 200 (b being 100) - on the y axis.
The Angle of the line. The line segment which x1,y1 = C (20,10) the center of the cirle and x2,y2 (1200,800).
The Ellipse is not rotated.

I'm attempting to draw an arrow in delphi from the center of this ellipse to a point (and have it start at the ellipse and not in the center). The ellipse will eventually move and the arrow could point in any direction.

Thank you in advance for any help. And for what it is worth, I did search and read everything I could find similar to this question.

share|cite|improve this question
Do you know the equation of the ellipse and the equation of the line that passes through two points? Just write them down and solve the system of two equations with two unknowns. BTW: your description does not make clear if the "minor" axis of the ellipse is in $x$ or in $y$. – leonbloy Apr 24 '12 at 0:47
up vote 1 down vote accepted

Here's a reasonable method: translate everything such that the center of the ellipse is at the origin. Consider the intersection of the ellipse with major axis $2a$ and minor axis $2b$ with the polar equation

$$r=\frac{a b}{\sqrt{b^2\cos^2\theta+a^2\sin^2\theta}}$$

and the line $\tan\,\theta=\dfrac{y_2-y_1}{x_2-x_1}$. (When solving the last equation for $\theta$, you will want to use the two-argument arctangent that is implemented in most computing environments.) Once having computed the corresponding values of $r$ at $\theta$ and $\pi+\theta$, convert to rectangular coordinates and translate back to your initialal origin.

share|cite|improve this answer
Thank you SO much for this answer. It turns out I already knew the angle and just had to get the distance (r). – opsin Apr 25 '12 at 0:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.