Self Intersecting Curve Problem

I am trying to model river dynamics with grasshopper. I have gotten half way there I believe, but need direction. The curve (river) is being divided, then shifting every point towards its tangent direction. When the curve self-intersects I need the closed curves to stay. Then the main curve rejoin at self-intersection points. Also need to figure out how to anchor the curve end points at their original positions.

Here is a video of someone who has successfully completed this. https://www.youtube.com/watch?v=tyHovt43Pf0

Have attached model and my script so far, would be very thankful for any help.


River 2.gh (10.5 KB)
River Model.3dm (206.2 KB)

REPLY

I have some stuff that does this (or a very similar thing anyway) but is written in C# (using recursion: a thing that calls itself for doing something [BTW: bake is not required here]). If you are familiar with coding - or you have plans to learn coding - notify … unless some good Samaritan can provide (a fast) solution on that using native GH components (and maybe something the likes of Anemone).

Hi, thank you, but have no coding experience, wouldn’t be sure how to do that. Looking for a native gh solution.

Hi @logan.drummond57,

Welcome! :slight_smile:

Since what you’re after requires looping, you’ll at least need the Anemone plugin for Grasshopper.

The solution, I’ve come up with is not perfect yet, but should be easily extendible.

river_with_anemone_3.gh (18.3 KB)

6 Likes

Thats amazing, thank you so much

1 Like