Using the Pin-And-String Method to create parametric equation for an ellipse

164 Views Asked by At

Starting with an ellipse, defined with the positions of the foci, and with the major axis length (the semi-major axis is half of the length of the string for the pin and string method), I am trying to create a map between an x-value (which I would like to be normalised at the end) and a point on the ellipse.

For example, if I specify a value of $\frac{1}{2}$, I would like for that to give me the cartesian coordinate of the location on the ellipse that is $\frac{1}{2}$ of the way across the ellipse.

To be more clear, in an ellipse where the foci are at $(\pm 1,0)$, and the semi-major axis is $\sqrt{2}$, (Which makes the semi-minor axis 1), a value of zero should return $(\sqrt{2},0)$, $\frac{1}{2}$ should give $(0,-1)$, etc.

I am looking for a general formula that will provide a continuous solution for the problem (of course, you need only worry about either the bottom or the top branch of the ellipse, whichever you prefer - I will use the bottom (or negative-y)).

1

There are 1 best solutions below

0
On

You can write any ellipse (centered in $0$, with foci either both on the $x$ or the $y$-axis, otherwise translate/rotate) in the form

$$\left\{(x,y)\in \mathbb{R}^2: \left(\frac{x}{a}\right)^2 + \left(\frac{y}{b}\right)^2 = 1\right\}$$ where $a$ and $b$ are the semi-axes. But then

$$y = \pm b\sqrt{1-\left(\frac{x}{a}\right)^2}$$

which is enough for your example. If you want arbitrary foci then you'll need to add some affine transformation $(x,y) \mapsto R(x,y) - c$ where $c$ is the center of the ellipse and $R$ is a rotation by minus the angle between the coordinate axes and the axes of the ellipse. This will map the your ellipse on the one above. Then you end up with

$$\left(\frac{R(x,y)-c}{a}\right)^2 + \left(\frac{R(x,y)-c}{b}\right)^2 = 1$$

which is still a polynomial of degree 2, so you can solve for y. (However I won't write down the whole calculation, which looks rather boring and ugly.)