def __init__(self, random):
     self.c = ColorTransform(random)
     # currently we always initialize pseudorandomly, but
     # eventually we'll want to generate this deterministically.
     self.theta = 2 * pi * random.random()
     self.compressme = random.signed_expovariate(0.8, 0.2)
     self.Mxx = cos(self.theta) * self.compressme
     self.Mxy = sin(self.theta) * self.compressme
     self.Myx = -sin(self.theta) * self.compressme
     self.Myy = cos(self.theta) * self.compressme
     translation_scale = 0.8
     self.Ox = random.signed_expovariate(0, translation_scale)
     self.Oy = random.signed_expovariate(0, translation_scale)
Example #2
0
 def __init__(self, random):
     self.c = ColorTransform(random)
     # currently we always initialize pseudorandomly, but
     # eventually we'll want to generate this deterministically.
     self.theta = 2*pi*random.random()
     self.compressme = random.signed_expovariate(0.8, 0.2)
     self.Mxx =  cos(self.theta)*self.compressme
     self.Mxy =  sin(self.theta)*self.compressme
     self.Myx = -sin(self.theta)*self.compressme
     self.Myy =  cos(self.theta)*self.compressme
     translation_scale = 0.8
     self.Ox = random.signed_expovariate(0, translation_scale)
     self.Oy = random.signed_expovariate(0, translation_scale)
 def __init__(self, random):
     theta = 2 * pi * random.random()
     translation_scale = 0.1
     self.a = Affine(rzero())
     self.a.Ox = random.signed_expovariate(0, translation_scale)
     self.a.Oy = random.signed_expovariate(0, translation_scale)
     nnn = random.expovariate(1.0 / 3)
     self.Nsym = 1 + int(nnn)
     if self.Nsym == 1 and random.randint(0, 1) == 0:
         # print 'Mirror plane'
         self.Nsym = 2
         theta = 2 * pi * random.random()
         vx = sin(theta)
         vy = cos(theta)
         self.a.Mxx = vx
         self.a.Myy = -vx
         self.a.Mxy = vy
         self.a.Myx = vy
     else:
         # print 'Rotation:', self.Nsym, 'from', nnn
         self.a.Mxx = cos(2 * pi / self.Nsym)
         self.a.Myy = self.a.Mxx
         self.a.Mxy = sin(2 * pi / self.Nsym)
         self.a.Myx = -self.a.Mxy
Example #4
0
 def __init__(self, random):
     theta = 2*pi*random.random()
     translation_scale = 0.1
     self.a = Affine(rzero())
     self.a.Ox = random.signed_expovariate(0, translation_scale)
     self.a.Oy = random.signed_expovariate(0, translation_scale)
     nnn = random.expovariate(1.0/3)
     self.Nsym = 1 + int(nnn)
     if self.Nsym == 1 and random.randint(0,1) == 0:
         # print 'Mirror plane'
         self.Nsym = 2
         theta = 2*pi*random.random()
         vx = sin(theta)
         vy = cos(theta)
         self.a.Mxx = vx
         self.a.Myy = -vx
         self.a.Mxy = vy
         self.a.Myx = vy
     else:
         # print 'Rotation:', self.Nsym, 'from', nnn
         self.a.Mxx = cos(2*pi/self.Nsym)
         self.a.Myy = self.a.Mxx
         self.a.Mxy = sin(2*pi/self.Nsym)
         self.a.Myx = -self.a.Mxy
 def __init__(self, random):
     self.a = Affine(random)
     self.spiralness = random.signed_expovariate(0, 3)
     self.radius = random.signed_expovariate(.4, .2)
     self.bounciness = random.signed_expovariate(2, 2)
     self.bumps = random.randint(1, 4)
Example #6
0
 def __init__(self, random):
     self.a = Affine(random)
     self.spiralness = random.signed_expovariate(0, 3)
     self.radius = random.signed_expovariate(.4, .2)
     self.bounciness = random.signed_expovariate(2, 2)
     self.bumps = random.randint(1, 4)