Public Group

# Help - Rope pls

This topic is 4229 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

can anybody help me. I have to make an animation of rope. there are two people (drawing with line only it is not important) and they waggle the rope. I do not know how can I do this animation it is not important this animation written language I mean it can be OpenGL C++ C# and etc. pls help me..

##### Share on other sites
Sounds like a basic physics problem; have you seen NeHe's rope tutorial? You could also use CodeSamplers example of a rope/chain physics using the Tokamak SDK.

##### Share on other sites
This isn't really a DirectX question, I'm going to move you to... for Beginners.

##### Share on other sites
I've done it before in 2D. The easiest way (I think) is to just use spring physics. Assume that you have a chain of masses connected by springs, and use Hooke's law to move them around.

##### Share on other sites
If two people are moving a rope then wouldn't that form a wave? If so then your problem just becomes using a sin function:

X=Time
Y=Sin(Time*Frequency)*Amplitude

or something similar.

Example:

##### Share on other sites
Quote:
 Original post by shadowisadogIf two people are moving a rope then wouldn't that form a wave? If so then your problem just becomes using a sin function:X=TimeY=Sin(Time*Frequency)*Amplitudeor something similar.

It's a little more complex than that.

You have to simulate the rope using spring physics, as UltimateWalrus said. A Verlet integrator will do the job quite well (even in 3D).

1. 1
Rutin
47
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632996
• Total Posts
3009776
• ### Who's Online (See full list)

There are no registered users currently online

×