Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Ranger_One

Simulating a String in 3d

This topic is 6112 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

Hi, How could one go about simulating a string in three dimensions? I''m not worried about the render so much as the math behind the movement of the string. I assume you would define a set number of points that represent the string, each being a 3d vector representation of a linear point of the string. But how could you move and end and make the string swing/wave properly? Any info would be appreciated, Ranger

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
First, you must clear your mind.
Beh beh beh beh beh...
Be the string.
Beh beh beh beh beh...
Be the string.

Okay seriously now... I would define a value to hold the amount of "speed-to-bend" ratio for each point in your string. Then, when the end is waved, the next point will wave with it up to the amount allowed by this ratio (based on the speed at which it was waved). Then, so the same with the next point, based on the previous one. Iterate through all the points, then repeat.
I have never done this, or even thought about it, but this would be my first guess.

Share this post


Link to post
Share on other sites
Look up bezier curves and splines. You''ll want each point to pass its "energy" on to the next, so that there''s a fluttering effect with varying force and a gentle settling effect when the application of force (such as wind, or waving the string) stops.

Share this post


Link to post
Share on other sites

  • 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!