I'm looking for an equation which will tell me whether or not a point in two-dimensional space, is located within an ellipse of known dimensions and orientation, and that is not orthogonal in nature.
Asked
Active
Viewed 51 times
1
-
Do you have an equation for the ellipse, or just the vertices and the eccentricity, or what? – Lubin Apr 04 '16 at 22:42
-
I have the semi minor and semi-major axes, and an angle, measured in degrees, for the orientation of the ellipse along the semi-major axis, I also have the X & Y coordinate values for the centroid of the ellipse – Steve Apr 04 '16 at 22:51
1 Answers
1
I would first find the foci of the ellipse. If half the major axis is $a$ and half the minor axis is $b$, then the distance from the center to each focus is $c$ where $a^2-b^2=c^2$. From that and the center itself and angular orientation of the major axis (both given) you can get the foci. Then add up the distances from your point P to both foci.
Sum < major axis means P is inside ellipse
Sum = major axis means P is on ellipse
Sum > major axis means P is outside ellipse.
Oscar Lanzi
- 39,403