Is there possible to generate this kind of line?

Is it possible to generate this kind of zigzag line between two lines? Like sewing two lines together.
the different sections would keep in different density but in similar gray level when people looking at it in a certain distance.
Thank you!


line question.dwg (27.6 KB)

Ay up sailor!
Here are two approaches:


Line_question.gh (18.5 KB)

Best regards,
Sir Ernest Shackleton


If this reply answers your question, please mark it as solved

1 Like

wow! really really appreciate it! :+1:

Try this

zigzag.gh (11.1 KB)

1 Like

Another possibility:

proportional-zig.gh (10.5 KB)

2 Likes

Thank you all of you! really really appreciate it! I try to apply it in this way, :joy:

thank you! Your script is really great! It is definitely what I want to produce that image above. :+1:

thank you!your solution is great two!

Oops, there still a bug here as pics show below.when two lines is wider than neighbor one, the zigzag line was attracted to the closest one.It make the image showing wrong figure. Can you help me to solve this problem?
Thank you!


problem.3dm (934.9 KB) problem.gh (13.2 KB)

Don’t use two long curves and split them than sort them based on their start points

problem (1).gh (243.2 KB)

2 Likes

You could just divide the left side curve and project the points to the right side curve to avoid those blank areas that curve closest point produces. Unless that is the look we are going for.

3 Likes

Or switching curves

4 Likes

Thank you for this further discussion. Now I understand how to deal with these vertical or horizontal lines,but I still got some problem with spiral lines, as this pic showing,


spiral problem.gh (13.9 KB) spiral problem.gh.3dm (1.0 MB)
I was wondering is there a method to restrict two line strictly from beginning to end, like from center spiral to outside gradually?
And that are pics what I want to produce as below, these are two types.

I think the algorithm is that create a spiral first then using image sampler to catch gray data to define the width of the spiral. this step two curve (outline) are produced then I use your script to generate the zigzag line between them create right pic like Monroe.
But I don’t know how to get the left pic, I only got a referent GH file the make the horizotal line image which is similar to it. Pls see the attachment.
Undulant Portrait.gh (202.0 KB)
Could you modify it to make it base on a sriral line one?

Thank you in advance!

2 Likes

Honestly these curve are separated at first, I try to connect them together to be two parallel lines then the problem occur :sweat_smile: