We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! I just made a variant of a sketch from Daniel Shiffmans book The Nature of Code which involves a recursive function. To modify the colors, I use a global variable, that gets incremented on every call of the function, but the incrementation only works for one of the two recursive calls:
I expected the smaller circles on both sides to change through the color spectrum, but somehow only the right side changes. I suspect, I is related to how variable scoping works, but I can't wrap my head around it. Does somebody have an idea?