🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Patrick Haggard Tue, 26 Jan 1993 14:14
Fit a circle to (x,y) datapoints?
#843
Author: Patrick Haggard
Date: Tue, 26 Jan 1993 14:14
9 lines
788 bytes
I have 40 (x,y) datapoints which I hypothesise form the arc of a 
circle of unknown origin and radius.  I want to find an estimate
of the radius of the circle.  The preferred platform is SAS:
I imagine proc nlin; would do it, but what is the neatest way
to specify y in terms of x.  Any suggestions on how to tackle this.
Thanks

Patrick Haggard
Re: Fit a circle to (x,y) datapoints?
#846
Author: William B Dwinnell
Date: Tue, 26 Jan 1993 19:20
7 lines
784 bytes
I don't know much about SAS, nor how much coding you could do in it,
but fitting a circle to a set of data points would be trivial for a
genetic algorithm. Frankly, I don't understand why GA's aren't used
more often, especially as they are limited by the weaknesses of 
least-squared error systems. Anyway, I'd specify the circle as
x and y of the center, and r, the radius.
Re: Fit a circle to (x,y) datapoints?
#863
Author: Clint Cummins
Date: Tue, 26 Jan 1993 22:44
9 lines
953 bytes
You can't specify y in terms of x, because a circle is not a function
(one x can map to 2 different values of y).  Instead, use a "fake" dependent
variable with the value zero, and on the right hand side, write the function
to be minimized (when squared).  This approach will work for any nonlinear
least squares package.  In your case, let's say the circle's origin is
(A,B) with radius R.  Dependent variable:  ZERO=0;
Function for PROC NLIN:  ZERO = R - SQRT((X-A)**2 + (Y-B)**2)

Clint Cummins
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads