Check if a point is within an ellipse

I have an ellipse centered at (h,k), with semi-major axis rx, semi-minor axis ry, both aligned with the Cartesian plane.

How do I determine if a point (x,y) is within the area bounded by the ellipse?


The region (disk) bounded by the ellipse is given by the equation:
So given a test point (x,y), plug it in (1). If the inequality is satisfied, then it is inside the ellipse; otherwise it is outside the ellipse. Moreover, the point is on the boundary of the region (i.e., on the ellipse) if and only if the inequality is satisfied tightly (i.e., the left hand side evaluates to 1).

Source : Link , Question Author : Dan Is Fiddling By Firelight , Answer Author : Srivatsan

Leave a Comment