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

Home » Public Forums » archive » Re: making a circle of certain values
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: making a circle of certain values [message #56106] Wed, 03 October 2007 01:42 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <david@dfanning.com> writes:
> rpertaub@gmail.com writes:
>
>> I have a set of data points (x,y coordinates) that can be plotted on
>> my 1240,1024 array. However, they are sparse x,y spots across the
>> image, and I want to 'thicken' it by drawing a circle with my x,y as
>> centers. I want to give it a certain radius and a certain value too,
>> so that the pixels in the circle (the filling) have values and can
>> thus contribute to my rgb image...
>> anyone know how to draw a circle, and assign a value to pixels within
>> that circle?
>
> I'd use the most useful routine I ever downloaded from the NASA
> Astronomy library: TVCIRCLE.
>
> You will probably have to write a new output keyword for that routine
> to recover the XY locations of the polygon it creates for the circle.
> Then use POLYFILLV to find the indices of the image inside that polygon.
>

Hmm, I just use this all the time:

pro circsym, _EXTRA=extra
theta=findgen(26)*0.251327412
xsym=cos(theta)
ysym=sin(theta)
usersym, xsym, ysym, _EXTRA=extra
return
end

either with CIRCSYM by itself, or CIRCSYM, /FILL, and then I'm ready
to plot with PSYM=8 and whatever SYMSIZE I want. And the circles stay
round!

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SetPixelData Error
Next Topic: label x axis

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

Current Time: Sat Oct 11 11:10:11 PDT 2025

Total time taken to generate the page: 0.72151 seconds