"Generate" Zig Zag PolyLine with Specific Lengths & Angles

I don’t know if this actually satisfies the kink constraint, and obviously @laurent_delrieu already solved it brilliantly. But this seemed like a fun little coding exercise to go with the morning coffee:


241025_RandomConstrainedZigZagWalk_00.gh (10.9 KB)

Edit: Missed the part about taking a left turn first (in the world XY plane):


241025_RandomConstrainedZigZagWalk_01.gh (10.9 KB)

Edit II: Your constraints make for some interesting looking squiggles if one keeps on walking: