I’ve got this script for creating weave patterns on stacks of curves. I’m very happy with it! However, it’s brittle because if I want to change the number of nodes in the horizontal pattern, or the number of patterns to apply vertically, it’s a bunch of copy/paste and adjustment which is fairly painful and error prone.
Right now the logic assumes a repeating 4x4 pattern, so it uses 4 split trees, applies one of four patterns to each of those, and merges them back together.
I would be much happier if I could supply the pattern in a single data tree and only have one copy of the vector creation logic. My best attempt so far is dynamically generating path masks for split tree, but that 1) seems suboptimal and 2) may be driving me insane trying to get right.
Any guidance on the better general purpose approach to this problem of taking N patterns and repeatedly applying each one to every Nth branch?
The lists of values in your four text panels (most of them zero, purple group in previous post) allow for some complex patterns. This probably makes no sense but I replaced the explicit lists with random values controlled by two sliders, ‘branches’ and ‘Seed’ (purple group). No other logic changes. If nothing else, it’s a test of data tree matching and looks correct (?) but I haven’t examined the output carefully.