Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from .worley import WorleyNoiseTensor
2from .fractal import FractalNoiseTensor
5class NoiseTensorGenerator():
6 def __init__(self, shape):
7 self.fractal = FractalNoiseTensor(shape)
8 self.worley = WorleyNoiseTensor(shape)
9 self.shape = shape
11 def __call__(self, *args, **kwargs):
12 return self.fractal(*args, **kwargs) if np.random.rand() < 0.5 else self.worley(*args, **kwargs)
15class NoiseSR(WorleySR):
16 def build_generator(self, shape):
17 return NoiseTensorGenerator(shape=shape)
20if __name__ == "__main__":
21 NoiseSR.main()