Mittwoch, 22. Juli 2009

Python 027



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

abstandbaelle=.001
nballi = 3
nballj = 3
xvar=10000

ball = []
line = []
for x in range(xvar):
ball.append(1)
line.append(1)

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

a=0
for i in range(100):
for i in range(nballi):
for j in range(nballj):
a += 10
ball[i*nballi+j].pos += (sin(a),cos(a*0.231),0)
line[i*nballi+j].append((ball[i*nballi+j].pos))

Keine Kommentare:

 
eXTReMe Tracker