LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect if point is within ellipse

I need to make a vi that checks if a given point lies inside ellipse. This elipse is build and plotted in this vi - this is the easy part since lot of examples are available.
The results should be true if the point is inside or not true if outside.
Can somebody help me, please?
0 Kudos
Message 1 of 3
(5,935 Views)

If you can plot the ellipse, you probably know it's equation, F(x,y) = 0.

In the canonical form, F(x,y) = (x/a)^2 + (y/b)^2 - 1.

An arbitrary point (X,Y) is inside the ellipse if F(x,y) < 0.

I'm pretty sure the same thing applies to the more general quadratic form of the ellipse equation.

I hope this helps. Zador.

0 Kudos
Message 2 of 3
(5,927 Views)
Simple geometry. Add the two distances from your testpoint to the two foci and see if the result is greater or smaller than 2a. See how far you get. 😉
 
 
0 Kudos
Message 3 of 3
(5,926 Views)