There are two parts: A. For the given tested points, you must check their connection with the given circle. B. You want to create points on the circumference of a given circle.
A. Yes, first of all, take the distance between your point (test point) and the center of the circle. Both of these points are defined in latitude and longitude. The formula for the distance between two points (x1, y1) and (x2, y2) is the distance d = sqrt [(x2-x1) ^ 2 + (y2-y1) ^ 2]. Now,
- If this distance is less than the radius of the circle, your test point is inside your circle.
- If this distance is greater than the radius, then the test point is outside the circle.
- If this estimated distance is equal to the radius of the circle, then this test point is located on your circle, that is, on the circumference of your circle.
B. In a circle, the full angle of theta is 360 degrees or 2 * Pi in radians. For a given circle whose center is (x1, y1) and radius r.
x = x1 + r * cos (theta)
y = y1 + r * sin (theta)
where theta works from zero to 2 * Pi and Pi is 3.1415.
Depending on how you do it. Example: if you want 10 points in a circle, then increment = (2 * Pi-Zero) / 10.
fist theta is zero, then theta is Zero + increment, then theta is Zero + increment + increment ie 2 * increment and then zero + 3 * increment and then and so on. if you do not get theta equal to 2 * Pi.
For all of the above, we compute x and y. All x and y coordinate points are on the circle circle.
Azeem rehman
source share