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

Home » Public Forums » archive » Ring in function graphics
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: Ring in function graphics [message #90317 is a reply to message #90315] Thu, 19 February 2015 10:41 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Thursday, February 19, 2015 at 9:07:27 AM UTC-7, Helder wrote:
> Hi,
> is it possible to draw a ring in fg?
> For example, given two circles:
> c = [0.5,0.5]
> rl = 0.1
> rh = 0.2
> i = image(/test)
> io = ellipse(c[0], c[1], major=rh, fill_background=1, /norm, target=i)
> ic = ellipse(c[0], c[1], major=rl, fill_background=0, /norm, target=i)
>
> I would like to "see through" the inner circle (ic).
>
> Thanks,
> Helder

You can use a single call to POLYGON:

a = findgen(101)/100*2*!PI
x = 0.5 + [0.3*SIN(a), 0.2*SIN(a)]
y = 0.5 + [0.3*COS(a), 0.2*COS(a)]
w = WINDOW()
p = POLYGON(x, y, FILL_COLOR='red', /NORMAL, LINESTYLE='none')

-Chris
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL8.4 hard crash
Next Topic: A Calculus-level language, FortranCalculus, Compiler for Tweaking Parameters.

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

Current Time: Wed Oct 08 16:03:49 PDT 2025

Total time taken to generate the page: 0.00378 seconds