So I’m trying my hand at generative art, with nested inscribed circles within a square.
What’s weird is that the exact same code gives wildly different output based on changing just the strokeWeight.
Here’s the link to program:
Try strokeWeights 1, 2 and 3 (and values in between)
Would really love to know what’s going on here. Interestingly there’s no obvious (to me) mapping from strokeweight to the output - value of 1 does what I want it to, 2 is completely unexpected, strokeWeight of 3 behaves as expected again. My guess is it’s a p5 bug, but I can’t think of what’s happening behind the scenes.
Oh, no it isn’t a bug. You multiply the side-variable every iteration of the for-loop and thats 1000 times! This is exponetionally growth so the side-variable gets larger than the float limit. I guess the JAVA2D renderer handles this issue in an other way. You can simply fix this by decreasing the iteration count of the for loop (for me it works fine with 30).