Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Please forgive my terminology if it is imprecise. In the diagram below, for known values of X, Y and Z, I am need to calculate the value (length) of M. (It's not homework, it's for an SVG animation...)

enter image description here

Thanks in advance.

share|cite|improve this question
up vote 1 down vote accepted

In the following I will take $X$ and $Y$ as the semiaxes of the ellipse. The equation of the ellipse is $$ \frac{x^2}{X^2}+\frac{y^2}{Y^2}=1. $$ You know $Z$, and you want to find $M$ sucha that the point $(M,Z)$ is on the ellipse. Substituting in the equation and a little algebra gives $$ M=\frac{X}{Y}\sqrt{Y^2-Z^2}. $$

share|cite|improve this answer


Ellipse equation is $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$

where $a$ is $X/2$ and $b$ is $Y/2$ according to your diagram.

Put $y=N$ in ellipse equation. $$\frac{x^2}{a^2}+\frac{N^2}{b^2}=1$$ and find two coordinate values of x. Then subtract them to find M.

share|cite|improve this answer

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.