Patching logic help

hello everyone!

let’s say we have this function (logistic equation):
Xn+1 = R.Xn.(1-Xn)

(made that into a patch and it works fine. i’ve attached the patch)

now, i know that when 0 < X < 1, X gets to a “resting” value.
what i want to do, is add 0.1 to my R value every time X gets to it’s resting point, graph that X and set X to it’s initial value (reset the n counter)

i know it may sound silly, but i can’t even think of how to make that into a patch…i guess i’m too attached to the “if…then” structure and it’s hard to let go…

any input on which nodes to use or something to read will be much appreciated!

a Switch (Value Input) is the closest you will get to IF-THEN structures.

Creating Feedback Loops would be an interesting topic for you. By using of a FrameDelay you can use a value from the last frame in the current frame. This allows looping through iterative calculations.

apart from that, a Queue (Spreads) node allow you to create a spread by appending individual values to it. i think this needs to be a core part of your patch…