BombeFinalMitFarbe
BombeKjell.py
—
Python Source,
8 KB (8954 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.black, material = materials.plastic)
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.black)
hals = cylinder(frame = event1, pos = (0,0.1,0), axis = (0,1,0), radius = 0.05,
length = 0.15,color = color.black, material = materials.plastic)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
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.emissive)
event2 = funke(groesse=1)
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)
for x in range(10):
explosion = funke(groesse = ( 1 * x))
time.sleep(0.01)
##for x in range(10):
## del explosion
## 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)],
##
##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)