Ejemplo n.º 1
0
   def random_vortex():
      a = settings.get_uniform('a')
      b = settings.get_uniform('b')
#      theta_step = settings['delta-theta']
      theta_step = settings['delta-theta'] / a
#     z_step = settings['delta-z']
      z_step = settings['delta-z'] / a
      return Vortex(a, b, theta_step, z_step)
Ejemplo n.º 2
0
   def __init__(self, lifetime, vortex):
      self.lifetime = lifetime
      self.vortex = vortex

      self.age = 0

      c = settings.get_uniform('particle-color-range')
      self.color = [c, 0.8, 0.3, 0.65]
Ejemplo n.º 3
0
 def __init__(self):
    
    lifetime = randint(300, 500)  # 400, 600
    vortex = Vortex.random_vortex()
    
    BaseItem.__init__(self, lifetime, vortex)
    
    c = [settings.get_uniform('particle-red-range'), \
       settings.get_uniform('particle-green-range'), \
       settings.get_uniform('particle-blue-range'), \
       settings['particle-transparency']]
    self.color = c
    
    # set transform for z to be 1 above floor
    self.transforms = [[0.,0.,1.],[0.,0.,0.],1.]
    self.pos = [0.,0.,0.]
    
    RandPlay()
Ejemplo n.º 4
0
 def random_vortex():
     a = settings.get_uniform("a")
     b = settings.get_uniform("b")
     dr = settings["delta-theta"]
     dz = settings["delta-z"]
     return Vortex(a, b, dr, dz)
Ejemplo n.º 5
0
 def random_strip(steps):
     vortex = Vortex.random_vortex()
     height = settings.get_uniform("height")
     points = list(Vortex.strip_generator(steps, vortex, height))
     coords = list(Vortex.texcoord_generator(len(points)))
     return points, coords
Ejemplo n.º 6
0
   def __init__(self, lifetime, vortex):
      BaseParticle.__init__(self, lifetime, vortex)

      c = settings.get_uniform('particle-color-range')
      self.color = [c, 0.8, 0.3, 0.65]