How can I create a simulations of a curtain? Grasshopper

Hi!
I’m really new to both rhino and grasshopper and would be really thankful to get some help with this task.
I’d like to create a simulation of a curtain (a fabric with gravity) that hangs from the upper side just like in the picture. Should I use Kangaroo or maybe Flexhopper?
If you’d like to answer, could you please lead me through all the commands?
Thank you!

2 Likes

Here you go.

1 Like

See the example definition I posted here:

5 Likes

curtain00000

13 Likes

Hi Daniel. I’m a Grasshopper newbie. I like this definition, and I’m trying to modify the curtain path so that it follows along a curve drawn in Rhino. It would be ideal to set a curve and have the curtain so that I can test out different paths. Do you have any ideas?

The curve I’m working with is 3 straight line segments connected by two arcs.

Hi @jmiddleton
Here’s a modification of that example so the top points slide along a rail given by a curve


curtain_rail.gh (21.8 KB)

2 Likes

@DanielPiker Awesome! Thank you! It’s working a lot smoother than what I was able to achieve on my own. Though I am having an issue where the sliding end of the curtain moves quicker than the intermediate points. This result in the curtain bunching up on itself instead of folding nicely along the entire curve. Is there a way to fix this? Are my curves the issue?
curves.3dm (2.6 MB)

It might be that you can avoid this just by moving the slider more slowly to give the collisions time to propagate.
Another way could be to change the way the motion of the attached points is driven.
In the first definition on the straight curve I had it so these points are all anchors with their target locations scaling simultaneously, whereas in the latest one I made it so only the one at the end is an anchor and it pushes the others as it moves.

1 Like

Here’s a version for the curved rail that moves all the attached points along the rail simultaneously
curtain_rail2.gh (21.4 KB)

1 Like

Perfect. Thank you so, so much!

1 Like

hello @DanielPiker ,

Thank you for this amazing tutorial!
May I kindly ask how may I place a kind of “hook” to create the following solution please:

Please find my script attached
231028_Kangaroo_Curtains.gh (23.5 KB)