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

Home » Public Forums » archive » Re: Circle drawing request.
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
Re: Circle drawing request. [message #7975] Wed, 29 January 1997 00:00
Kevin Ivory is currently offline  Kevin Ivory
Messages: 71
Registered: January 1997
Member
David Kennedy wrote:
> This must be a FAQ - anyone got a good circle drawing sub-routine?
> Input - x, y, radius
> Output - [x,y] vectors for POLYFILL etc.
>
> I have been using one (shown below) but I find it produces fine lines
> shooting off to small y values from the left and right edges of each
> circle. And my fiddling with it has made it worse I'm afraid.

Hi David,
I posted this one yesterday, but you may have missed it (I didn't
actually notice any flaw in the other one, but this is quite
straightforward - sorry I haven't commented it yet):

function circle, xcenter, ycenter, radius
a = (2*!pi/99.)*findgen(100)
x = xcenter + radius * cos(a)
y = ycenter + radius * sin(a)
return, transpose([[x],[y]])
end

Best regards
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Postfach 20 mailto:kivory2@gwdg.de
D-37189 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: S: catching the output of help,/mem into variable-programm ???
Next Topic: Colour Postscript and 'colorbar'.

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

Current Time: Wed Oct 08 19:30:56 PDT 2025

Total time taken to generate the page: 0.00585 seconds