From ad6b5fe19193aa111025f7a19d9f890f8dabff19 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Thu, 7 Sep 2023 21:07:25 +0200 Subject: [PATCH] Tweaking some constants --- priorConditionedAnnealing/noise.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/priorConditionedAnnealing/noise.py b/priorConditionedAnnealing/noise.py index 03a01c3..95e266a 100644 --- a/priorConditionedAnnealing/noise.py +++ b/priorConditionedAnnealing/noise.py @@ -103,15 +103,15 @@ class Perlin_Noise(): self.octave = octave self.magic = 3.141592653589 # Axis offset, should be (kinda) irrational # We want to genrate samples, that approx ~N(0,1) - self.normal_factor = 14/99 - self.clear_cache_every = 1024 + self.normal_factor = 14.99 + self.clear_cache_every = 128 self.reset() def __call__(self, shape=None): if shape == None: shape = self.known_shape self.index += 1 - noise = [self.noise([self.index*self.scale, self.magic*a]) / self.normal_factor + noise = [self.noise([self.index*self.scale, self.magic*(1+a)]) / self.normal_factor for a in range(shape[-1])] if self.index % self.clear_cache_every == 0: self.noise.cache = {}