Mittwoch, 22. Juli 2009
Python 032
from visual import *
import random
scene.width=900
scene.height=700
scene.center=(22,11,1)
nball = 2
xvar=10000
ball = []
line = []
for x in range(xvar):
ball.append(1)
line.append(1)
# Ball und Linie deklarieren
ball[1] = sphere(pos=(0,0,0), radius=0.0001)
ball[2] = sphere(pos=(0,0,0), radius=0.0001)
line[1] = curve(radius=1, color=color.black)
t = 0
k = 1
l = 6
m = 6
n = 1
faktor = 100
for i in range(1000):
t += 0.01
for i in range(nball):
ball[1].pos = (sin(t*k)*faktor,cos(t*l)*faktor,0)
ball[2].pos = (sin(t*m)*faktor/1,cos(t*n)*faktor/1,0)
var = ball[1].pos + ball[2].pos
line[1].append((var), color=color.green)
Abonnieren
Kommentare zum Post (Atom)
Keine Kommentare:
Kommentar veröffentlichen