1
$\begingroup$

Let's say that an ellipse is inscribed in a rectangle and their center $(0,0)$ is therefore the same. I am trying to find a function that maps every point $(x_{r},y_{r})$ from the area of the rectangle (with known dimensions) to a point $(x_{e}, y_{e})$ inside the area of the ellipse (with minor axis equal to the height and major equals to the width of the rectangle, being inscribed to it).

So points on the edge of the rectangle map to the edge of the ellipse, and points inside the rectangle map inside the ellipse (e.g. all the points along the major/minor axis would map directly).

$\endgroup$
1
  • $\begingroup$ Are there any other properties that you’d like this mapping to have? If not, you could cast a ray through the point and scale by the ratio of the distances to its intersections with the ellipse and rectangle. $\endgroup$
    – amd
    Oct 10 '18 at 22:01
0
$\begingroup$

I don't understand what you mean by your last sentence "(e.g. all the points along the major/minor axis would map directly)", but this might be an example.

Assume the width of the rectangle equals $2a$, and the heigth $2b$. Then $$ \begin{cases} x = a r \cos t \\ y = b r \sin t \end{cases} \quad \text{with $t\in[-\pi,\pi]$, $r\in[0,1]$,} $$ parametrises the full ellipse. So all we still need is a map that maps the rectangle $[-a,a]\times[-b,b]$ to $[-\pi,\pi]\times[0,1]$. One example is the map $(x,y)\mapsto (\frac{\pi}{a}x, \frac{1}{2b}y+\frac{1}{2})$. Composing this with the parametrisation, gives $$ (x,y)\mapsto \left(a\Bigl(\frac{1}{2b}y+\frac{1}{2}\Bigl)\cos(\frac{\pi}{a}x),b\Bigl(\frac{1}{2b}y+\frac{1}{2}\Bigr)\sin(\frac{\pi}{a}x) \right). $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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