Create an angled polyline with different segment dimensions from a curve

Hey everyone!
I’m pretty new to Grasshopper, so I’m sorry for my ignorance of possible solutions. I’ve been trying to achieve the following result for a project. I’m sorry for the bad sketch, but it shows the basic idea.


I’m trying to create the shape on the right out of the shape on the left - A polygon composed of segments from three fixed dimensions with various angles.
I’ve tried several approaches, as example creating a polyline from the original curve, but always stumbled across problems or differences from the desired concept.

What would the basic steps be to achieve this solution?

Thank you so much in advance! It would really help the current situation.

I think your best shot is with Kangaroo

please explain very well what kind of constraints you are looking for

Thank you for your input, I will check out Kangaroo!

I’m looking to define a set of segment lengths - As example 30,50,100 - And create a polyline that is composed out of a (optimally random) composition of these segments.

Alternatively to the curve as the original input, I’ve attempted to generate a set of points that are then merged into a polyline, but I was not successful with the length.

this is the first thing that came to my mind, everything of course depends on the length of the initial curve, the available segment lengths, and the seed of the (pseudo) random selection [I say “pseudo” because it’s not random: it picks a, b, c, a, b, c… sequentially, and just sorts those in random order with Jitter]

curve_bang_kangaroo_inno.gh (22.7 KB)

1 Like

Wow that’s incredible! Thank you a lot for this script, and sorry for my late answer, had a busy day. I think I understand how the different notes come together, and I like the shapes that it’s creating! Can’t thank you enough, I’ll have some more tries and see how it goes. I’ll keep you updated, and once again, thank you so much for this. I do have a question though, what is the role of the expression / equation?

1 Like

Kangaroo’s Line Length Component wants a number (for each Line)
when the slider is set to 0, through the expression component it supplies Line Length the original line length
when the slider is set to 1, it gives the Line Length component the final desired (random-ish) length

Alrighty understood! Thank you again! :grinning_face_with_smiling_eyes: