# Simulating Rope Knot tightening using Kangaroo 2

Hi There,

I was trying to make a simulation of the tightening of a knot in a rope, using Kangaroo. I have been moderately successful, but have a solution that is very fussy to parameterise correctly to get the model to resolve properly.

Here is a model of a Figure-Of-Eight knot (which I use for rock-climbing):

FigureOfEight.1.gh (36.7 KB)

The model tightens up nicely, to a given rope radius, with a delightful shimmy after some time as the initial approximation finds a tighter conformation (something a real rope also does, when the rope is tensioned).

However, I am using the Kangaroo Collision component, with a series of line segments as input. If the line segments are longer than four-times the collision radius, the rope tends to pull through itself; if the line segments are too short, the line repels itself, resulting in a messy kinking in the line:

I would rather like to increase the number of line segments, and increase the rope diameter, but these aims are in conflict. Long line segments result in local minima, that are not escaped by the simulation.

I saw a very old thread on the old grasshopper forum (Rope-Length Minimization with Kangaroo) which appears to be discussing a Kangaroo 1 component that does actual line-on-line collisions. The current Kangaroo Collision component does accept lines, but the collisions appear to be modeled by colliding spheres centred on the end-points of the lines, rather than colliding the lines themselves. Is there a current Kangaroo component that would give this effect?

Does anyone have any comments on the whole approach to knot minimization? I would like a solution that is less fussy over parameters, where I can bump up the number of line segments and the radius and it ‘just works’!

Cheers,

Bob

FigureOfEight.1.gh (52.6 KB)

You could use the rod goal instead of the line goal. The trick is to start the solver with a high length factor and while it is running, you drag the slider down to let’s say 0.3. In some cases the grab tool can be useful to pull one rope over the other.

I’ve done a few knots some years ago. My main goal however were knots with flat webbing so I had to use slightly more complicated goals. You’ll find some images and animations here:

Shoe laces - Gallery - McNeel Forum

5 Likes

knot_tighten_example.gh (25.2 KB)

The collider component in Kangaroo2 does do line-line collisions, just like in that old Kangaroo1 discussion. The collision is based on the shortest distance between each pair of segments, which means the collision volume around each line segment is a capsule shape.

When the radius is high relative to the segment length, they can push against capsules nearby along the length of the rope, not just the actual collisions. This is causing the kinking you saw.

This was one of the things I added the ‘IgnoreA/IgnoreB’ inputs for. It lets you tell the goal to skip certain pairs in the collisions to avoid these unwanted ones.
For a single polyline, this indexing isn’t too bad, like in the example at the top you just choose how many adjacent segments to skip.
The indexing can get a bit more complex if you have multiple polylines. I remember thinking it might be useful to make a component to do this in a more automated way.

I’ve also thought a bit about rope friction for knot simulation - for something more realistic, and knots that actually stay knotted when tightened, we’d need to include the directional friction where parts of the rope cause other parts to twist when they pull against each other.

17 Likes

Someone do a granny knot

1 Like

Thank you, Martin and Daniel - This is terrific stuff.

I had looked at the Rod component, but failed to appreciate that the Length Factor input would provide the required shortening, nor that using it to fight the kinking effect of the Collision component would be so effective. The extra stiffening allows the number of line segments to be greatly increased, resulting in a much smoother knot.

I really liked the Shoe Laces thread. My search had not found that one, given the title!

Daniel - Thank you for the explanation of the actual collision approach for lines. This makes much more sense than my end-points explanation. Black-box analysis can be completely wrong!

I had tried to use the IgnoreA/B inputs, and thought I was doing it correctly, but it had no effect for me. I will look closely at your example to see what I got wrong there.

I am still at a loss as to the difference between Axial Strength (used by Martin) and Bend Strength (used by you). I’ve been through all the Kangaroo model examples (such as Rod.gh). It is inevitable that these demos concentrate on just one component, but it is the interplay between conflicting goals that makes this so interesting!

Friction! Turbulence! Granny Knots! How evil can we get?

1 Like

The axial strength is the resistance of each segment to changes in in its length.
With only this (leaving aside collisions for now), a polyline will behave like a chain - when you pull its ends apart, it resists stretching, and when you bring the ends together it just crumples.
When you add bending resistance too it resists change in the angle between consecutive segments, so when you bring the ends together it will bend into a smooth elastica curve instead of just crumpling.

Collisions can slightly complicate this, because of the issue I showed in the diagrams above - when collisions between adjacent segments are not ignored, they can push against each other and also give a sort of bending resistance (indeed in real materials bending resistance comes from a combination of the inner parts of a curve resisting compression and the outer part resisting tension).
For certain radius and segment length/strength combinations this sort of collision induced bending resistance can work fairly well, but sometimes it can also cause the problems with kinking like you saw. So sometimes it can be helfpul to use the ignore indices to separate the collision from the bending simulation.

1 Like

The behavior of the granny and associated family of knots are a great example of the role of directional friction and twist in knots.
Despite looking almost identical, the square knot is a fairly good secure knot, while the grief knot is about as insecure as a knot can get, and comes apart with even the slightest movement.

I find this ‘constructive cogging’ effect fascinating.

So I am interested in developing some friction for this, as I’ve never really seen the phenomenon simulated before except by making a complex mesh of the rope as a solid. The torsion resistance is possible with the beam elements, but the directional friction would require adding something new (and I think it would also need a distinction between static and dynamic friction).

10 Likes

Thanks Daniel for making Kangaroo! The things we can do!!!

3 Likes

Seconded! Although I am feeling slightly sea-sick!

1 Like

Do you always have a piece of climbing rope handy at your desk?

My understanding has been that a square knot is great for attaching two rope ends so long as the knot can rest against a surface to keep its structure. If you use it to attach two free hanging ends of rope, there’s a change it collapses and loses all it’s hold.

1 Like

You wanted a Granny:
Reef.1.gh (19.8 KB)

The Thief/Grief thing is a question of loading the wrong ends, which is not simulated here.

Changing the knot types without Resetting is entertaining! If you want the right answer, a Reset is needed.

3 Likes

I was also able to get Nik Willmore’s Icosahedral model to work with Kangaroo 2:
Icosahedron.1.gh (40.2 KB). Keeps my little machine working hard, but gets it done just fine!

Thanks for this post and sharing such great work. I landed here via the McNeel Forum Summary Email I receive weekly and I must say it is one of my favorite emails to read each week, for precisely this kind of post!

4 Likes

Disabling Multipipe when the Solver is running saves some time.

I went down another rabbit hole:

RopeOverlap4.2.gh (23.8 KB)

This stuff is too much fun!

Thanks again to Martin and Daniel for advice on Rod stiffening.

Bob

3 Likes