Shift each list (branch) of tree independently

Hello!

My goal is to draw a spiral on a cylinder.

I have a cylinder. I have generated a grid of uv points on the surface of this cylinder using the Divide Surface (SDivide) component. The result is a very simple tree where each branch is a list of points across the surface of the cylinder. My idea is to use the Curve On Surface (CrvSrf) component to join these points in order to obtain a spiral that goes along the cylinder. In order to achieve this, I’m trying to shift each list (branch) of the tree by an amount corresponding to the index of its branch. This has to keep working if the uv point grid is modified.

It doesn’t look so hard to do but I can’t figure it out… I was thinking of a c# script but my knowledge is too low to do it by myself… Thank you for your help!

Spiral on cylinder.gh (7.6 KB)!
Screenshot

Is this what you want?


Spiral on cylinder_re.gh (13.4 KB)

1 Like

Amazing! Thank you!
Would there be an easier way to achieve the same result? Thanks!

This will give you more control over the resulting spirals.


Spiral on cylinder_reV2.gh (20.0 KB)

2 Likes

Thanks a lot!