Zig zag around a curve shape

Starting to learn Grasshopper and I’m running into an issue trying to make this type of shape:


However I want to be able to make that zig-zag pattern around a more organic start shape like this:

Wondering if anyone smarter than me can give me any clues, tips, or help figuring it out?

Thanks

I’d start by finding the normal to the curve at each point and then offset along that direction by alternating positive and negative values.

1 Like

Thank you @Measure that got me on my way.

Here is how I ended up doing it, but I ran into a weird issue with the domain of the curve and the normals. First I had to remap the domain to 0 - 1 so evaluate curve would see the entire curve.

Then used Cross Product to make sure I would move the vector perpendicular to the curve and then multiply the movement by a series of 1,-1 to offset them in each direction alternating.

What do you think of this solution?

Thanks again for your insight!

1 Like

You can use the Perp Frames component to get the points and normals together without needing to reparameterize.


1 Like

Oh thats how to use prep frames. I was so confused I was trying to use that after dividing the curve and couldn’t get it to work. THANK YOU SO MUCH!! Implementing that also made the whole algorithm run faster too!

1 Like