Bombe
BombeKjell.py — Python Source, 11 KB (12244 bytes)
Dateiinhalt
from visual import * import time ##scene.stereo = "redcyan" event1 = frame() koerper = sphere(frame = event1, radius = 0.2, pos = (0,0,0), color = color.red) ##hitbox = box(frame = event1, pos = (0,0,0),height = 3, width = 2, length = 2, opacity = 0.1) lunte = curve(frame = event1, pos =[(0,0.25,0),(0,0.3,0.15),(0.1,0.3,0.1),(0.15,0.35,0), (0,0.4,-0.1)], radius = 0.01, material = materials.chrome,color = color.red) hals = cylinder(frame = event1, pos = (0,0.1,0), axis = (0,1,0), radius = 0.05, length = 0.15 ) class funke(frame): def __init__(self,pos = (0,0,0), groesse = 1): frame.__init__(self) self.funke1 = cone(frame = self, pos =(0,0.4,-0.1), axis = (1,0.5,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke2 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,1,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke3 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,0.5,1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke4 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-1,0.5,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke5 = cone(frame = self, pos =(0,0.4,-0.1), axis = (1,-0.5,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke6 = cone(frame = self, pos =(0,0.4,-0.1), axis = (1,0.5,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke7 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,1,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke8 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,-1,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke9 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,1,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke10 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,0.5,1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke11 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,-0.5,1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke12 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,0.5,-1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke13 = cone(frame = self, pos =(0,0.4,-0.1), axis = (1,-0.5,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke14 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-1,0.5,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke15 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-1,-0.5,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke16 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,-1,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke17 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,1,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke18 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,-1,0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke19 = cone(frame = self, pos =(0,0.4,-0.1), axis = (0.5,-0.5,-1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke20 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,0.5,-1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke21 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,-0.5,1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke22 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-1,-0.5,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke23 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,-1,-0.5),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) self.funke24 = cone(frame = self, pos =(0,0.4,-0.1), axis = (-0.5,-0.5,-1),radius = 0.005*groesse, length = 0.15*groesse, color = color.yellow, material = materials.chrome) event2 = funke() for x in range(0,15,1): event2.pos = ( x / 100.0, 0 - x / 300.0, -0.0 + x / 150.0) lunte.pos[4] =( x / 100.0, 0.4 - x / 300.0, -0.1 + x / 150.0) time.sleep(0.05) for x in range(0,15,1): event2.pos = (0.15 - x / 300.0, -0.05 - x / 300.0, 0.1 + x / 150.0) lunte.pos[4] =(0.15 - x / 300.0, 0.35 - x / 300.0, 0 + x / 150.0) lunte.pos[3] =(0.15 - x / 300.0, 0.35 - x / 300.0, 0 + x / 150.0) time.sleep(0.05) for x in range(0,15,1): event2.pos = (0.1 - x / 150.0, -0.1 , 0.2 + x / 300.0) lunte.pos[4] =(0.1 - x / 150.0, 0.3 , 0.1 + x / 300.0) lunte.pos[3] =(0.1 - x / 150.0, 0.3 , 0.1 + x / 300.0) lunte.pos[2] =(0.1 - x / 150.0, 0.3 , 0.1 + x / 300.0) time.sleep(0.05) for x in range(0,15,1): event2.pos = (0 , -0.1 - x / 250.0 , 0.25 - x / 100.0) lunte.pos[4] =(0 , 0.3 - x / 250.0 , 0.15 - x / 100.0) lunte.pos[3] =(0 , 0.3 - x / 250.0 , 0.15 - x / 100.0) lunte.pos[2] =(0 , 0.3 - x / 250.0 , 0.15 - x / 100.0) lunte.pos[1] =(0 , 0.3 - x / 250.0 , 0.15 - x / 100.0) time.sleep(0.05) for x in range(0,15,1): event2.pos = (0 , -0.15 - x / 65.0 , 0.1) time.sleep(0.01) # pos =[(0,0.25,0),(0,0.3,0.15),(0.1,0.3,0.1),(0.15,0.35,0), (0,0.4,-0.1)], ## ##funke1 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (1,0.5,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke2 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,1,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke3 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,0.5,1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke4 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-1,0.5,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke5 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (1,-0.5,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke6 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (1,0.5,-0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke7 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-0.5,1,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke8 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,-1,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke9 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,1,-0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke10 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-0.5,0.5,1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke11 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,-0.5,1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke12 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,0.5,-1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ## ## ##funke13 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (1,-0.5,-0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke13 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-1,0.5,-0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke13 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-1,-0.5,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ## ##funke14 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,-1,-0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke14 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-0.5,1,-0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke14 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-0.5,-1,0.5),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ## ## ##funke15 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (0.5,-0.5,-1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke15 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-0.5,0.5,-1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ##funke15 = cone(frame = event1, pos =(0,0.4,-0.1), axis = (-0.5,-0.5,1),radius = 0.005, length = 0.15, ## color = color.yellow, material = materials.chrome) ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##figur = frame() ##koerper = ellipsoid(frame = figur, ## height = 1,length = 0.5, width = 0.5,pos = (0,0,0),color = color.red, ## material = materials.wood) ##hitbox = box(frame = figur, pos = (0,0,0),height = 3, width = 2, length = 2, opacity = 0.001) ##gesicht = pyramid(frame = figur ,pos= (-0.1,0.7,0),size = (0.75,0.3,0.5),color = color.red, ## material = materials.wood, axis = (1,-1,0)) ##beinlinks = curve(frame = figur ,pos=[(0,-0.2,0),(0.2,-0.8,0.1),(-0.25,-1.1,0.25)], ## radius = 0.08,color = color.red, material = materials.wood) ##beinrechts = curve(frame = figur ,pos=[(0,-0.2,0),(0.25,-0.8,-0.25),(0.25,-1.1,-0.25)], ## radius = 0.08,color = color.red, material = materials.wood) ##armlinks = curve(frame = figur ,pos=[(0,0.45,0),(0,0,0.3),(0.25,-0.3,0.25)], ## radius = 0.08,color = color.red, material = materials.wood) ##armlinks = curve(frame = figur ,pos=[(0,0.45,0),(0,0,-0.3),(0.25,-0.3,-0.25)], ## radius = 0.08,color = color.red,material = materials.wood) ##augelinks = ellipsoid(frame = figur, pos = (0.1,0.68,0.1), ## length = 0.08,height = 0.05, width = 0.05, axis = (-0.5,0.9,0.25), ## material = materials.chrome,color = color.orange) ##augerechts = ellipsoid(frame = figur, pos = (0.1,0.68,-0.1), ## length = 0.08,height = 0.05, width = 0.05, axis = (-0.5,0.9,-0.25), ## material = materials.chrome,color = color.orange) ##ohrlinks = pyramid(frame = figur, pos = (-0.05,0.75,0.1), ## size = (0.35,0.1,0.1),axis = (-0.5,1,0), color = color.red, ## material = materials.wood) ##ohrrechts = pyramid(frame = figur, pos = (-0.05,0.75,-0.1), ## size = (0.35,0.1,0.1),axis = (-0.5,1,0), color = color.red, ## material = materials.wood) ##figur.pos =(0,0,0)