drawbot
drawbot copied to clipboard
ImageObject.randomGenerator() yields a constant result
Hello,
Despite the name random, the randomGenerator() method of ImageObject() yields the same result every time.
Minimal reproduction:
img = ImageObject()
img.randomGenerator((1000, 1000))
image(img, (0,0))
Is there a way to supply a seed parameter or perhaps instruct CoreImage to reinitialise to get a different result on each execution?
Thanks! :—)
well the image generated is random to infinity only DrawBot cannot draw infinite images so it clips it to the given size, so you see always the same result
see https://developer.apple.com/library/archive/documentation/GraphicsImaging/Reference/CoreImageFilterReference/index.html#//apple_ref/doc/filter/ci/CIRandomGenerator
@typemytype Thank you Frederik for clarifying. In other words there’s nothing that can be done to randomise the result at all?
What I am asking is if I draw a randomGenerator(size=(10, 10)), perhaps it would output a random (10, 10) crop of the infinite image?