Function for one half of an ellipse (horizontal or vertical)

132 Views Asked by At

Suppose I have an Ellipse like

$$4x^2 + 9y^2 = 36$$

which would be written in standard form as:

$$\frac{x^2}{3^2} + \frac{y^2}{2^2} = 1$$

How do I create a function that gets:

  • the top half of the ellipse only?
  • the right half of the ellipse only?
1

There are 1 best solutions below

0
On BEST ANSWER

Following suggestion from @Tyma Gaidash,

Isolate y for bottom (-) and top (+) of ellipse $$ \frac{x^2}{3^2} + \frac{y^2}{2^2} = 1 \\ \frac{y^2}{2^2} = 1 - \frac{x^2}{3^2} \\ \frac{y}{2} = \pm\sqrt{1 - \frac{x^2}{3^2}} \\ y = \pm2\sqrt{1 - \frac{x^2}{3^2}} \\ $$

Isolate x for left (-) and right (+) sides of ellipse $$ \frac{x^2}{3^2} + \frac{y^2}{2^2} = 1 \\ \frac{x^2}{3^2} = 1 - \frac{y^2}{2^2} \\ \frac{x}{3} = \pm\sqrt{1 - \frac{y^2}{2^2}} \\ x = \pm 3\sqrt{1 - \frac{y^2}{2^2}} $$