# Wavy pattern

**URL:** <https://discourse.mcneel.com/t/wavy-pattern/142843>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [May 21, 2022, 11:02am UTC](https://discourse.mcneel.com/t/wavy-pattern/142843 "2022-05-21T11:02:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shamil](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/shamil/32/736545_2.png) [@Shamil](https://discourse.mcneel.com/u/Shamil)\
**Post date:** [May 21, 2022, 11:02am UTC](https://discourse.mcneel.com/t/wavy-pattern/142843/1 "2022-05-21T11:02:57Z")

</div>

Hello everyone ! How can this pattern be recreated in grasshopper (see the attachment ) ? Need some advice

 ![Паттерн градиент превью](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/b/e/1be1bbef8fd72a9a276ad210ee8cebfe47e5688b.jpeg)  
[Паттерн градиент.pdf](https://discourse.mcneel.com/uploads/short-url/yhPYiSbZlrmlLYp9AtomAqFFZRk.pdf) (524.0 KB)

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [May 21, 2022, 1:41pm UTC](https://discourse.mcneel.com/t/wavy-pattern/142843/2 "2022-05-21T13:41:47Z")

</div>

Hello  
that’s a quite interesting pattern, seems simple but it is not. There are 3 parts

1. The circle radius is following a gradient in X direction
2. The connecting “line” between dots is 0 at left and maximum at right and quite random in the middle
3. Connecting the circle it is not clear if it is an arc or 2 arcs and a line.

Here a little script.  
First generate the grid, here with square but whatever.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/e/8/1e89956a4bbdd6b16818d84becf80f3ab6cff1d0.png)  
The suppress some of the line depending on a value depending on X, the graph mapper helps you here.  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/9/f/a9fb740741bd63993beb592499c7c4314e37d447.png)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/1/8/718326ecf881589ffe70f1b76543538e96c05502.png)

Search for random variant for other way of doing

> [@How to generate random gradient pattern along one direction](https://discourse.mcneel.com/t/how-to-generate-random-gradient-pattern-along-one-direction/115417):
>
> I am trying to dispatch a list of patterns that randomly but gradient denser in one direction. was not satisfied with the gens pool. any recommendaiton? [how to create random gradient pattern in one direcion.gh](https://discourse.mcneel.com/uploads/short-url/oOXcjowdSuo2mPR2avitlH8ikkF.gh) (24.5 KB)

Place circles on the plane. I choose an equation for the radius of circle, but I must have used a Graph Mapper but it is more complex for the following stages because I will have to work with DataTree.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/e/a/bea5dc1cdb9eac92c6c6928f2f0a2256043b724a.jpeg)

The more difficult part is to connect the circles.  
I choose to connect them with arcs depending on a normalized value.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/7/4/2742b95d53d00c860b5cf8e2ac787037c6695a2d.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/c/8/9c813ac998b40532a9f67e24cbff5c21e8d1ab9e.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/1/3/5134fd5f2028a27ed5570eecdae4e922148491f8.jpeg)  
[circle offset.gh](https://discourse.mcneel.com/uploads/short-url/fnYqIhCCm1UzQ4DuYP71Wbyx8vb.gh) (28.1 KB)

And I had some difficulties but this one could be useful also

> [@2D metaball like connection between distort forms](https://discourse.mcneel.com/t/2d-metaball-like-connection-between-distort-forms/58631):
>
> Is there a component that connects two 2D surfaces like with metaballs (see image)? [metaball like connection 01.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/a/b/ab1af70893c2030720eb3606bc833a851270ed0f.gh) (12.2 KB)

---

<div class="post-metadata">

**Author:** ![Shamil](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/shamil/32/736545_2.png) [@Shamil](https://discourse.mcneel.com/u/Shamil)\
**Post date:** [May 21, 2022, 2:08pm UTC](https://discourse.mcneel.com/t/wavy-pattern/142843/3 "2022-05-21T14:08:34Z")

</div>

that was super fast! its impressing how fast you managed to write the script ! Thanks a lot!

---

<div class="post-metadata">

**Author:** ![laurent\_delrieu](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/laurent_delrieu/32/601605_2.png) [@laurent\_delrieu](https://discourse.mcneel.com/u/laurent_delrieu)\
**Post date:** [May 21, 2022, 2:13pm UTC](https://discourse.mcneel.com/t/wavy-pattern/142843/4 "2022-05-21T14:13:59Z")

</div>

Look also at the last link it could be useful also. And dont forget to mark the answer as a solution.

---

<div class="post-metadata">

**Author:** ![Shamil](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/shamil/32/736545_2.png) [@Shamil](https://discourse.mcneel.com/u/Shamil)\
**Post date:** [May 21, 2022, 2:17pm UTC](https://discourse.mcneel.com/t/wavy-pattern/142843/5 "2022-05-21T14:17:15Z")

</div>

👌 also subscribed to your IG page
