Recursive Tree Roots, Data Structure Issues

Hello all,

I’m working on a script to grow plant roots using anemone, but I’ve gotten stuck. I’ve tried to versions, one where the data that loops is a point/vector pair (each growing tip) and one where it’s an curve for each segment. The goals are pretty simple: moving toward an attractor point and avoiding obstacles. it gets complicated when I try to implement a branching scheme with a conditional (so I can vary how branched or unbranched the roots are depending on plant physiology).

Any ideas what’s going wrong here?

Thanks to anyone that can help.

recursive_roots_function.gh (63.7 KB)

If you haven’t seen it yet, this definition/example may be useful to you.

13anmn_tree a.gh (14.8 KB)