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

Python 036



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 = 10
t=0
while(1):
rate(30)
t += 1
ball1.pos.x = size*cos(t/50.0)
ball1.pos.y = size*sin(t/50.0)
ball3.pos.x = size*(-cos(t/30.0))
ball3.pos.z = size*(-sin(t/30.0))
tail1 = curve(pos=(ball1.pos,((1*ball3.pos)+(0.3*ball1.pos))))

Python 035



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 = 10
t=0
while(1):
rate(30)
t += 1
ball1.pos.x = size*cos(t/20.0)
ball1.pos.y = size*sin(t/20.0)
ball3.pos.x = size*(-cos(t/20.0))
ball3.pos.z = size*(-sin(t/20.0))
tail1 = curve(pos=(ball1.pos,ball3.pos))
 
eXTReMe Tracker