Jump to content
  • Advertisement
Sign in to follow this  
Mystery

Spring force formula

This topic is 5045 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 guys L - spring vector l - length of the spring (scalar) ks - spring constant kd - damping constant v1,v2 - velocities of spring's ends r - rest length of the spring May I know what is the correct formula to calculate spring force between 2 points? Is it this : f1 = {ks(l-r) + kd[(v1-v2)*L]/l}*L/l f2 = -f1 or f1 = -{ks(l-r) + kd[(v1-v2)*L]/l}*L/l f2 = -f1 Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I just keep running into you [8^)

first, I'm going to call L/l => L^ (unit length vector)

OK, break this into two parts:

Components:
Fspring = ks * (l - r)
Fdamping = kd * [(v2 - v1) dotproduct L^]

final version:
Ftotal = L^ * (Fspring - Fdamping)

yopu may need to play with the signs, depending on which direction L is calculated; (p2 - p1) or (p1 - p2).

Share this post


Link to post
Share on other sites
Thanks for your help again. The reason why I am confused is that I saw somewhere here the correct formula posted here is the first version whereas the version I got on the paper I am reading is the 2nd one.

I suspect the formula found here -> http://www.dcs.uky.edu/~seales/dli2/iccv-final-01.pdf under section 3.2.1 is wrong. Hope you can verify it. Thanks.


Quote:
Original post by lonesock
I just keep running into you [8^)

first, I'm going to call L/l => L^ (unit length vector)

OK, break this into two parts:

Components:
Fspring = ks * (l - r)
Fdamping = kd * [(v2 - v1) dotproduct L^]

final version:
Ftotal = L^ * (Fspring - Fdamping)

yopu may need to play with the signs, depending on which direction L is calculated; (p2 - p1) or (p1 - p2).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!