Circles (under my eyes!)

Martyh

Registered User.
Local time
Yesterday, 23:00
Joined
May 2, 2000
Messages
196
Hi there! I'll get right to the point :

I got an X and Y cordinate... and I've got a radius (of uncertainty). What I need to know is how many of these points, about 60,000 points in the database and also with X and Y coordinates fall within the "radius of uncertainty.

How do I do the calculations ? This really has me stumped....

TIA
Marty H.


***********************************
Latest Info
***********************************

I've just found the solution in my daughter's geometry book:

r = SQRT( (x-a)**2 + (y-b)**2)

where (x,y) equals the coordinates of the centre of the circle
and (a,b) equals the coordinates of one of the data points
and r = the straight line distance between the two;

The calculation of r is made and then tested against the radius of uncertainty.

One caveat: the bulk of the points can be eliminated by a simple testing of the x or y being outside of the radius of error!! Only the square area within the the radius of error really requires detailed calculation.

************************************************

I'm not sure how the code will be written, but I've solved my own problem!!

:)
 
Last edited:
When all fails, look it up (in you're kid's textbook). lol
 

Users who are viewing this thread

Back
Top Bottom