Curve pattern influenced by curved shapes

Hello I am trying to achieve a pattern of parallel curves that is wrapping around closed curves as shown in hand drawn image uploaded. I have used kangaroo 2 curve point collide to achieve this goal. But problem is that curves are not wrapping around the closed curves nicely. Pease help achieve that pattern. I want curves to be wrapping tightly around closed curves. Later I want to achieve this with multiple closed curves to design a pattern I am using for an artwork. Also rite now my script only works on a regular closed curve, I have an irregular curve in the script as well which did not repel curves outside the boundaries.


test.gh (16.9 KB)

What you want to do can be achieved with vector fields. See for example:

1 Like

I tried this method before but I wanted to do this pattern for irregular forms or other closed curves as well , so I tried to use kangaroo… any method in which I can do this with a star shaped closed surface maybe for an example.

Not really an answer but this look quite similar with points.

Here’s a script that you can use to generate an approximation of the laminar flow around a collection of shapes:


flowaround.gh (76.8 KB)

17 Likes

Thank you Daniel !

Thanks Daniel, looking at the results of your code I think I manage to replicate to do the same thing with my Nautilus components. So I put weights on some point on edges depending on their position in Y. I neither thought of this :exploding_head:


flowaround_LD.gh (76.8 KB)

8 Likes

in case someone wants to open this on mac:
you’ll get an error message opening the script file to point the kangaroo solver dll:
paste in this path for Rhino 8:

/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Versions/A/Resources/ManagedPlugIns/GrasshopperPlugin.rhp/Components/KangarooSolver.dll
2 Likes

Hi daniel I am unable to run this script even after redirecting kangroo solver path for rhino 8 when your script opens. can you please share screenshot of your script as well so that I can plug in the missing components to run the script.

I think this result is only available to paid users , because I am not getting the same results as yours.

Which version of Rhino are you using? Windows or Mac? What’s the error message?

Ah, I think I may have forgotten to internalise the input geometry when I first uploaded.
Try this:
flowaround.gh (76.8 KB)

Yes it worked now Daniel. Thank you. Can I request you for explanation of the logic you have used to create this script, I am not good with scripting in programming language, I would like to create it through grasshopper if possible.

1 Like

This isn’t something that can be done with standard GH components, because it involves iterative solving. (Essentially it’s solving for heat diffusion on a mesh using the discrete Laplace-Beltrami operator, then taking isocurves. It is also keeping the temperature equal along the length of each of the obstacle curves, which causes the isocurves to not meet the obstacles but instead flow around them).

1 Like

Ok thank you for that explanation. Appreciate your help.

Hello
I am interested to see what you get ? And if a component is showing a message ?
Here a version with various weights on curves




flowaround_LD (1).gh (78.5 KB)

5 Likes

Actually it occurred to me that we could also do a similar thing without scripting by treating it as a soap film in Kangaroo, with height instead of temperature. Of course this is still iterative solving behind the scenes, but perhaps it makes it more geometrically intuitive what’s going on.


flowaround_kangaroo.gh (16.6 KB)

12 Likes

It was showing last component red with message this component is showing partial results.

I’ll have too look at my tools but there are 2 tools with quite the same name, one is free and not the other.
I don’t find a clue, I think you uploaded a version with this component and I changed it. Licence component MUST have a yellow square.

Oh ok. Will check that yellow box and use free component to make it work. Thanks a lot.