How to find places within a given radius

Technical assistance & information for projects
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

How to find places within a given radius

Post by Neo » Sat Feb 06, 2010 4:41 am

In an x-y Cartesian coordinate system, the circle with center (h, k) and radius r is the set of all points (x, y) such that,
circle.png
circle.png (869 Bytes) Viewed 2871 times
This is general equation of the circle.

Now, you need to find a given point (x,y) is within the circle or not.

If a point (x,y) is within the circle it must satisfy (x-h)^2 + (y - k)^2 < radius^2

If it is on the circle then should satisfy (x-h)^2 + (y - k)^2 = radius^2

If given (x,y) is within or on the circle, should satisfy (x-h)^2 + (y - k)^2 <= radius^2

If the point is in the exterior of the circle it should satisfy (x-h)^2 + (y - k)^2 > radius^2
Post Reply

Return to “Project Assistance”