Jump to content

  • Log In with Google      Sign In   
  • Create Account

Problems on drawing a dynamic rope in OpenGL..


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 voidmain1313113   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 July 2014 - 12:44 AM

Hi guys, I want to draw a rope in 3d with OpenGL. The best material I can find online is this tutorial: http://nehe.gamedev.net/tutorial/rope_physics/17006/

 

Though the article is quite comprehensive, I still got some questions.

 

First of all is how to initial place the masses. In the tutorial, author hangs one end of the rope, and let the rest part of the rope fall, which is quite easy to calculate their locations. In my app, I want to hang both end of the rope, so it's kind of hard to calculate the initial places.

 

Secondly, I want to make the length of the rope dynamic, which when I move the end points, I want the rope grow/shrink with them. How do I implement this? How do I dynamic add / remove masses?

 

Big thanks!



Sponsor:

#2 rip-off   Moderators   -  Reputation: 8726

Like
1Likes
Like

Posted 13 July 2014 - 04:58 AM

Have you considered using a physics engine for this?

#3 voidmain1313113   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 July 2014 - 05:59 AM

Have you considered using a physics engine for this?

 

Yes I do, and I've tried Box2d with it's rope sample. But I still don't know how to stretch/shrink the rope...






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS