# Basic pseudocode to create a rope physics

I am trying to simulate the physics of a 2D hanging rope, consistent of a series of n-links. It could be a series of four pendulums. I just want some movement of the rope and the ability to contact with the ground. I was inspired by this question and this one.

I would like to programme it from zero in Python or a similar modelling program, but I don't find simple maths to recreate this effects. Which are the basic equations to escalate a series of n-links to resemble like a rope, please?

• It looks like that first link already has working code you can translate, and the second has some explanation of the thinking behind these rope models. Where have you run into difficulty adapting these answers to your Python solution? Mar 19 '20 at 11:24
• probably, i'm not very skillful at coding and I'm more used to sinthetic math equations which then I can translate to Python or similar programming languages. Mar 19 '20 at 11:34
• Here is another detailed answer regarding how to implement 2d verlet chain type physics: stackoverflow.com/a/42618200/12145926 Mar 19 '20 at 18:30

• ability to contact with the ground To make it able to react with game world you need link it with game collision code. In your case Python, I dont know which will you use. But for my case Unity, I put tiny SphereCollider on each rope node and it can now rest on ground.