I want to calculate in java when a circle is inside an ellipse. I drew an example below:
For this particular problem, the top left corner of the field has the position 0.0f, 0.0f
. The bottom right corner has the position 1.0f, 1.0f
. The position of the bat is: 0.48f, 0.94f
. The goal is located at: 0.5f, 1.0f
, height is 0.1f
and the radius 0.4f
.
How can I calculate if the bat is inside the ellipse? What is the general algorithm?