We have a point (x,y) and a set of some other points (xi,yi). How can we determine which of (xi,yi) are within a circle with center (x,y) and radius r (a given number)?
If the distance is greater than the radius, the point lies outside. If it's equal to the radius, the point lies on the circle. And if it's less than the radius, you guessed it right, the point will lie inside the circle. As simple as that!
(xi-x)**2 + (yi-y)**2 < r**2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With