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

Home » Public Forums » archive » Re: circles
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: circles [message #9516 is a reply to message #9512] Wed, 09 July 1997 00:00 Go to previous messageGo to previous message
Martin Lizak (NEI) is currently offline  Martin Lizak (NEI)
Messages: 1
Registered: July 1997
Junior Member
lady of the elves wrote:
>
> [incidentally, I'm new to this language :)]
A simpler way to to that is as follows

function makecircle
im=bytarr(200,200)

; if you make the angular resolution too small, you'll have blank lines
theta=findgen(1000)*!pi/1000. - !pi/2.

for i=0,999 do begin
y=fix(99.*sin(theta(i)))+100
xmin=-fix(99.*cos(theta(i)))+100
xmax=fix(99.*cos(theta(i)))+100
im(xmin:xmax,y)=2
endfor
return,im
end

>
> I'm trying to create a two-dimensional array, such that tvscl of the
> array will show a filled circle. So far, my best idea has not
> worked--but here it is:
>
.
.
> I would really like to have a circularly-filled array; if anyone has
> better knowledge, please let me know :)
> Thanks.
> -gzb
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: .Free Cash Grants
Next Topic: Are IDL functions callable from C++ programs under Win-NT

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

Current Time: Sat Nov 29 07:12:03 PST 2025

Total time taken to generate the page: 2.32486 seconds