Beispiel #1
0
    def set_rotation(self):
        if self.debug:
            print('Setting rotation')

        self.rot_distort.calculate_rotation(urand(c.rot_theta),
                                            offset=(urand(c.rot_offset_x),
                                                    urand(c.rot_offset_y)))
Beispiel #2
0
 def make_priorities(self):
     self.wav_priority = urand(c.wave)
     self.warp_priority = urand(c.warp)
     self.affine_priority = urand(c.affine)
     self.maxv = max(self.wav_priority, self.warp_priority,
                     self.affine_priority)
     self.minv = min(self.wav_priority, self.warp_priority,
                     self.affine_priority)
Beispiel #3
0
    def set_scale(self):
        if self.debug:
            print('Setting scale')

        self.scx = urand(c.scale_x)
        self.scy = urand(c.scale_y)
        self.scale_distort.calculate_scale(
            (self.scx, self.scy),
            offset=(urand(c.scale_x_offset), urand(c.scale_y_offset)))
Beispiel #4
0
    def set_tint(self):
        if self.debug:
            print('Setting tint')

        if self.use_color:
            self.tint = [urand(c.rgb_shift) for _ in range(3)]
        else:
            self.tint = [0, 0, 0]
Beispiel #5
0
    def set_wave(self):
        if self.debug:
            print('Setting wave')

        self.wave_distort.create_sinusoidal_wave(urand(c.wave_ax),
                                                 urand(c.wave_ay),
                                                 urand(c.wave_perx),
                                                 urand(c.wave_pery),
                                                 urand(c.wave_phax),
                                                 urand(c.wave_phay))
Beispiel #6
0
    def set_offset(self):
        if self.debug:
            print('Setting offset')

        self.displace.create_affine(1., 1., 0, 0, urand(c.x_offset),
                                    urand(c.y_offset))