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

Home » Public Forums » archive » Fit a circle ?
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
Fit a circle ? [message #32800] Fri, 08 November 2002 01:39
<zeschke is currently offline  <zeschke
Messages: 1
Registered: November 2002
Junior Member
Hallo,

is there a simple way to fit a circle (a radius) on a set of x,y-points,
which are only come from a small part of the circle ?
I want to use the mpfitellipse.pro-Routine (Craig Markwardt).

I tried this without success :
;;;;;;;
; Construct a set of points (should be a part of a circle)
x= dindgen(100)-50.
y= x^2 *1e-8 + 1e-6*randomn(seed, 100)
plot,x,y,psym=1

; Fit circle and plot result
p = mpfitellipse(x, y,/circular)
phi = dindgen(101)*2D*!dpi/100
plot, p(2)+p(0)*cos(phi), p(3)+p(1)*sin(phi),/iso
oplot, x, y, psym=1
;;;;;;;
IDL> print,!version
{ alpha vms vms 5.4 Sep 25 2000 32 32}


thanks in advance,
Thomas Zeschke
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: dereferencing a pointer to an object array
Next Topic: Re: Fit a circle ?

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

Current Time: Wed Oct 08 15:37:44 PDT 2025

Total time taken to generate the page: 0.00520 seconds