Test if a point is within 2 parametric "cut-off" ellipses

63 Views Asked by At

I have 2 parametric ellipses, both represented using the standard parametric equation of an ellipse:

$$x = h + a \cos t $$ $$y = k + b \sin t $$

Lets say that the ellipses are cut-off at (see diagram)

$$ t = t1_{e1}, t1_{e2}, t2_{e1}, t2_{e2} $$

and also assuming the cut is a straight line.

enter image description here

What would the condition to test whether a point lies in the shaded (green) region?

1

There are 1 best solutions below

0
On

The equation of the ellipse can be rewritten as:

$$\frac {(x-h)^2}{a^2} + \frac {(y-k)^2}{b^2} = 1$$

So given a test point $(x,y)$,

You need $\frac {(x-h_1)^2}{a_1^2} + \frac {(y-k_1)^2}{b_1^2} < 1$

and you need $\frac {(x-h_2)^2}{a_2^2} + \frac {(y-k_2)^2}{b_2^2} > 1$

... for it to lie between the two ellipses.