Jump to content
  • Advertisement
Sign in to follow this  
jakussano

WIRE , CHAIN

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Simple question: how do i simulate a wire , roupe or a chain in 2d simulation? () if you have any ideas, suggestion i'd like to hear them

Share this post


Link to post
Share on other sites
Advertisement
Before answering this, I need to know a little about your background. How much programming experience do you have? Do you know how to use vector math? Have you done other physics simulations?

cheers,
Mike

Share this post


Link to post
Share on other sites
Well i know to use vector matrices, and for example: the last thing done for engine is to calculate the angle rotation between too balls; so i know some..

Share this post


Link to post
Share on other sites
I would try relaxation first. It's very simple. You iterate over the chain multiple times. For each segement you compute the difference between the intended length and the actual length between the segment vertices. Then you move the vertices slightly towards the intended length. This will violate the neighboring segments, but then you adjust those as well. You continue this until all the segments are within some tolerance of the intended length.

It works very well. It works well with verlet integration also.

Share this post


Link to post
Share on other sites
@bzroom

AFAIK this relaxation method, where you change positin directly, conserves energy very poorly. If you use this method, a swinging rope will come to a halt quite fast, even if no damping or friction is added to the simulation.

If you want the rope to be able to swing as-good-as ifinitley, you will probably need to do something along the lines of the NEHE spring simulation tutorial linked to earlier.

Share this post


Link to post
Share on other sites
You're right. I was thinking more along the lines of just finding a solution, not necessarily a real time interactive simulation of the rope. Modifying the velocity with forces would be much more satisfying to play with.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!