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

Home » Public Forums » archive » extract points of acircle
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: extract points of acircle [message #93548 is a reply to message #93542] Wed, 17 August 2016 09:06 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, August 16, 2016 at 11:21:20 AM UTC-4, AGW wrote:
> Hi,
> I want to plot four circles on picture then extract mean x,y for every circle
> I use this program.
>
> ;******************************************
> FUNCTION CIRCLE, xcenter, ycenter, radius
> points = (2 * !PI / 99.0) * FINDGEN(100)
> x = xcenter + radius * COS(points )
> y = ycenter + radius * SIN(points )
> RETURN, TRANSPOSE([[x],[y]])
> END
>
> restore,file='sm.isv' ;/v
> sm1=sm[*,*,5]
> window,0,xs=999,ys=512
> tvscl,sm1
>
> n=5
> for i=0,n-1 do begin
> radius=10*i
> pp=circle(200,352,radius)
> cgPlotS, pp,color='red',thick=2.0, /Device
>
> ;*************************************
>
> at this point no problem, I want to print mean(x,y) for every circle
>
> how can I do it ?

Not sure what you are after. The mean value of the sampled coordinates of a circle is just the centroid. In your example, AVERAGE(pp[0,*]) is simply 200 and AVERAGE(pp[1,*]) is 352. Did you want to extract some information about the picture inside the circle?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Calling Supermongo in IDL
Next Topic: How convert the grid size from irregular grid to regrid size using CMIP5 model in IDL?

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

Current Time: Wed Oct 08 15:09:55 PDT 2025

Total time taken to generate the page: 0.00354 seconds