comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to get the center and radius for a x,y array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to get the center and radius for a x,y array [message #64976] Fri, 06 February 2009 23:21 Go to next message
oupin is currently offline  oupin
Messages: 7
Registered: December 2008
Junior Member
On Feb 7, 9:06 am, Vince Hradil <vincehra...@gmail.com> wrote:
> On Feb 6, 7:05 pm, Vince Hradil <vincehra...@gmail.com> wrote:
>
>
>
>> On Feb 6, 6:52 pm, oupin <hhb1...@gmail.com> wrote:
>
>>> On Feb 7, 12:19 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>>> On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
>
>>>> > I want to get the center and radius for a 2-D array which includes x,y
>>>> > values. Could you give me some suggestions and examples?
>
>>>> We're going to need more details.  You have (x,y) pairs?  Do you want
>>>> Center-of-mass?  What do you mean by "radius"?  Do you want to fit a
>>>> circle?
>
>>> Yes, I have (x,y) pairs, and want to fit a circle using these data,
>>> and calculate the center and radius of the circle.
>
>> Ah - so just minimize sum{ r*r - ( (xi-xc)*(xi-xc) + (yi-yc)*(yi-
>> yc) ) } to find [r,xc,yc].
>
> Is that right - I'm getting tired... it's something like that anyway.

yes, that is what I mean
Re: How to get the center and radius for a x,y array [message #64987 is a reply to message #64976] Fri, 06 February 2009 17:06 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 6, 7:05 pm, Vince Hradil <vincehra...@gmail.com> wrote:
> On Feb 6, 6:52 pm, oupin <hhb1...@gmail.com> wrote:
>
>> On Feb 7, 12:19 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>> On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
>
>>>> I want to get the center and radius for a 2-D array which includes x,y
>>>> values. Could you give me some suggestions and examples?
>
>>> We're going to need more details.  You have (x,y) pairs?  Do you want
>>> Center-of-mass?  What do you mean by "radius"?  Do you want to fit a
>>> circle?
>
>> Yes, I have (x,y) pairs, and want to fit a circle using these data,
>> and calculate the center and radius of the circle.
>
> Ah - so just minimize sum{ r*r - ( (xi-xc)*(xi-xc) + (yi-yc)*(yi-
> yc) ) } to find [r,xc,yc].

Is that right - I'm getting tired... it's something like that anyway.
Re: How to get the center and radius for a x,y array [message #64988 is a reply to message #64987] Fri, 06 February 2009 17:05 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 6, 6:52 pm, oupin <hhb1...@gmail.com> wrote:
> On Feb 7, 12:19 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>> On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
>
>>> I want to get the center and radius for a 2-D array which includes x,y
>>> values. Could you give me some suggestions and examples?
>
>> We're going to need more details.  You have (x,y) pairs?  Do you want
>> Center-of-mass?  What do you mean by "radius"?  Do you want to fit a
>> circle?
>
> Yes, I have (x,y) pairs, and want to fit a circle using these data,
> and calculate the center and radius of the circle.

Ah - so just minimize sum{ r*r - ( (xi-xc)*(xi-xc) + (yi-yc)*(yi-
yc) ) } to find [r,xc,yc].
Re: How to get the center and radius for a x,y array [message #64990 is a reply to message #64988] Fri, 06 February 2009 16:52 Go to previous messageGo to next message
oupin is currently offline  oupin
Messages: 7
Registered: December 2008
Junior Member
On Feb 7, 12:19 am, Vince Hradil <vincehra...@gmail.com> wrote:
> On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
>
>> I want to get the center and radius for a 2-D array which includes x,y
>> values. Could you give me some suggestions and examples?
>
> We're going to need more details.  You have (x,y) pairs?  Do you want
> Center-of-mass?  What do you mean by "radius"?  Do you want to fit a
> circle?

Yes, I have (x,y) pairs, and want to fit a circle using these data,
and calculate the center and radius of the circle.
Re: How to get the center and radius for a x,y array [message #65002 is a reply to message #64990] Fri, 06 February 2009 08:19 Go to previous messageGo to next message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
> I want to get the center and radius for a 2-D array which includes x,y
> values. Could you give me some suggestions and examples?

We're going to need more details. You have (x,y) pairs? Do you want
Center-of-mass? What do you mean by "radius"? Do you want to fit a
circle?
Re: How to get the center and radius for a x,y array [message #65026 is a reply to message #64976] Mon, 09 February 2009 20:23 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Feb 7, 2:21 am, oupin <hhb1...@gmail.com> wrote:
> On Feb 7, 9:06 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>
>
>> On Feb 6, 7:05 pm, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>> On Feb 6, 6:52 pm, oupin <hhb1...@gmail.com> wrote:
>
>>>> On Feb 7, 12:19 am, Vince Hradil <vincehra...@gmail.com> wrote:
>
>>>> > On Feb 6, 10:09 am, oupin <hhb1...@gmail.com> wrote:
>
>>>> > > I want to get the center and radius for a 2-D array which includes x,y
>>>> > > values. Could you give me some suggestions and examples?
>
>>>> > We're going to need more details.  You have (x,y) pairs?  Do you want
>>>> > Center-of-mass?  What do you mean by "radius"?  Do you want to fit a
>>>> > circle?
>
>>>> Yes, I have (x,y) pairs, and want to fit a circle using these data,
>>>> and calculate the center and radius of the circle.
>
>>> Ah - so just minimize sum{ r*r - ( (xi-xc)*(xi-xc) + (yi-yc)*(yi-
>>> yc) ) } to find [r,xc,yc].
>
>> Is that right - I'm getting tired... it's something like that anyway.
>
> yes, that is what I mean

POWELL will probably work for you. Just define a function that
calculates the sum that Vince gave (you'll probably need to use a
common block to pass through your x,y pairs - at least, that's usually
how I do it) and feed it into POWELL.

-Jeremy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Reduced chi-square goodness-of-fit statistic
Next Topic: Re: NASA IDL Astronomy Library Still There?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:15:53 PDT 2025

Total time taken to generate the page: 0.00679 seconds