Mittwoch, 22. Juli 2009

Python 024



from visual import *
scene.width=900
scene.height=700
scene.center=(111,111)

abstandbaelle=.01
nballi = 6
nballj = 6
...
# hier müssen noch die Arrays deklariert werden
...

for i in range(nballi):
for j in range(nballj):
ball[i*nballi+j] = sphere(pos=(8,j*abstandbaelle,i*abstandbaelle))
line[i*nballi+j] = curve(pos=[(8,j*abstandbaelle,i*abstandbaelle)], radius=1, color=color.green)

for i in range(100000):
for i in range(nballi):
for j in range(nballj):
ball[i*nballi+j].pos += tan((ball[i*nballi+j].pos)/3)
line[i*nballi+j].append((ball[i*nballi+j].pos))

Keine Kommentare:

 
eXTReMe Tracker