Spiral
Chris
nospam at [127.0.0.1]
Thu May 30 08:12:06 EDT 2002
I've written a small QBASIC program which draws a spiral. Here is the
code:
SCREEN 12
CLS
FOR t = 1 TO 400 STEP .01
x = .5 * t * COS(t)
y = .5 * t * SIN(t)
PSET (x + 320, y + 240)
NEXT t
I noticed that it generated some interesting patterns, probably as a
result of rounding errors. These can be explored further by making the
spiral tighter.
Anyway, I wonder if anyone would be so kind as to convert it to Python
because then I can try and decide whether Python is easy enough for me
to learn!
--
Chris
More information about the Python-list
mailing list