More pythonic circle?

John Machin sjmachin at lexicon.net
Sun Apr 9 21:31:26 EDT 2006


[Pythor]
Sure, I tested it.
===
I don't think that word means what you think it means :-)

[Pythor]
On the other hand, I'm not
having any trouble producing a whole circle, while you seem to think
I'm only producing half a circle.  The code that limits itself to a 5x5
box is only expected to produce an eighth of the circle.  The actual
assignment portion uses reflection to plot points in the whole area.
If there's some other problem with it, I haven't noticed.
===
Here's the problem:
 if field==None:
        field=numpy.zeros((radius,radius),'u')

If radius is 5, field is 5x5 => train smash.




More information about the Python-list mailing list