Samstag, 21. November 2009

Python 037

schmalere Streifen, welche auf den andern Ball zeigen

from visual import *

ball1 = sphere()
ball1.pos = (3,0,0)
ball2 = sphere()
ball2.pos = (0,0,0)
ball2.color = color.green
ball3 = sphere()
ball3.pos = (-3,0,0)
ball3.color = color.cyan

size = 20
t=0
while(1):
rate(10)
t += 1
ball1.pos.x = size*sin(t/10.0)
ball1.pos.y = size*sin(t/20.0)
ball1.pos.z = size*sin(t/30.0)
ball3.pos.x = size*cos(t/10.0)
ball3.pos.y = size*sin(t/20.0)
ball3.pos.z = size*sin(t/30.0)
tail1 = curve(pos=(ball1.pos,(1*ball3.pos+5.0*ball1.pos)/6.0))
tail1.radius = 0.2

Keine Kommentare:

 
eXTReMe Tracker