def make_priorities(self): self.wav_priority = urand(co.wave) self.warp_priority = urand(co.warp) self.affine_priority = urand(co.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)
def set_wave(self): self.wave_distort.create_sinusoidal_wave(urand(co.wave_ax), urand(co.wave_ay), urand(co.wave_perx), urand(co.wave_pery), urand(co.wave_phax), urand(co.wave_phay))
def set_warp(self): self.warp_distort.create_sinusoidal_warp(urand(co.warp_ax), urand(co.warp_ay), urand(co.warp_perx), urand(co.warp_pery), urand(co.warp_phax), urand(co.warp_phay))
def set_offset(self): self.displace.create_affine(1., 1., 0, 0, urand(co.x_offset), urand(co.y_offset))
def set_rotation(self): self.rot_distort.calculate_rotation(urand(co.rot_theta), offset=(urand(co.rot_offset_x), urand(co.rot_offset_y)))
def set_scale(self): self.scx = urand(co.scale_x) self.scy = urand(co.scale_y) self.scale_distort.calculate_scale( (self.scx, self.scy), offset=(urand(co.scale_x_offset), urand(co.scale_y_offset)))
def set_tint(self): self.tint = [urand(co.rgb_shift) for _ in range(3)]