Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Radius algorithm
Posted:
Dec 8, 1996 4:26 PM


> In article <329CB599.62CD@worldnet.att.net>, > Marcus <SCI.@worldnet.att.net> says: >I have a number of x,y data points that form an arc of constant radius. > Do you know a good technique for finding the center and radius of the arc? >I've tried the following, but I'm not sure of it's reliability: >take first data point, find line running through point but also tangent >to the arc, take second data point and find line tangent again. >Normalize both lines and find the intersection. This will give me the >center, from here the radius is easy. > >Do you have any suggestions? >Thanks, Marc
As some previous persons sugested, you shoud use an optimization method.
If C is your center, and M(i), the points of your trajectory,then your radius is :
R = 1/N *sum_{i=1}^N {M(i)  C },
You can find C by minimizing
m = sum_{k=1}^N {M(k)  c  R}^2 = sum_{k=1}^N {M(k)  c  1/N *sum_{i=1}^N {M(i)  C }^2
Or, if you are sure that your curve is a circle, you can use a linear algorithm by setting :
R = sqrt (1/N * sum_{i=1}^N {OM(i)  OC ^2}) = sqrt (1/N * sum_{i=1}^N {OM(i)^2  2 t(OM(i)).OC + OC^2})
You want to minimize :
m = sum_{k=1}^N {OM(k)  OC^2  R^2}^2 = sum_{k=1}^N { OM(k)^2  1/N*sum_{i=1}^N OM(i)^2  2*t(OM(k)1/N*sum{i=1}^N OM(i)).OC}^2
You get then an easy to solve linear least squares paroblem where your unknown is OC.
If you derive this expression with respect to OC, and set the derivation to 0, you will get a simple equation A.OC = b, where A is a 2*2 matrix, and b is a 2*1 vector.
I hope this helps. Feel free to contact me for more details.
Karine
 Karine Lecarpentier, M.A.Sc student UBC, Dept. of Electrical Engineering email: karinel@ee.ubc.ca 2356 Main Mall phone: (604) 8220532 Vancouver, B.C fax: (604) 8225949 V6T 1Z4 Canada



