Jump to content
  • Advertisement
Sign in to follow this  

mass spring mesh

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

I would like represent my object as mass spring mesh to simulate soft body dynamics.

Mass represent  vertex while edge represent spring that connect two adjacent vertex.


I draw a this simple example to explain my problem.





I have four mass m1,m2,m3,m4 and know the values and their positions.

I know the stiffness coefficient kij and dumping coefficient cij of mesh springs where i and j are the vertex index.


In figure 1 the system is in the rest position.

In figure 2 after apply a force to m4 point the system change configuration,


The user move the m4 point from figure 1 to figure 2 position.

A force applied to m4 move the mass m4.

m1 mass rest in the same position again in figure 2 while mass m2 e m3 have a new position.

I would like calculate the new position of m2 and m3 mass after that user move the m4 mass.

I know the formula about Fi_int the internal force on the vertex i and the damping force Fi_ext on the vertex.

Please help me solve this problem.






Share this post

Link to post
Share on other sites

Couple questions:


1. Is figure 1 the initial condition? That is, are all the masses all and all the spring forces are zero?


I would like calculate the new position of m2 and m3 mass after that user move the m4 mass.



2. If you're only interested in calculating the final position of m4, you don't need to consider damping coefficients. Damping is only a function of velocity. When all the masses are at rest there is no damping. The mass positions will all be colinear (all in a line).


This is just a quick derivation, so double check the algebra!


The letter L represents the distance between two masses
and assumes each spring was at it's rest position before m4 was moved

and ALL k's and distances are > 0.

Forces on m2 must sum to 0 since masses are at rest:
k12 * L12 = k24 * L24, so
1) L12 / L24 = k24 / k12

Forces on m3:
k13 * L13 = k34 * L34
2) L13 / L34 = k34 / k13

You know L14 from the final position of m4, so:

L12 + L24 = L14
L13 + L34 = L14

L12 = L14 - L24
1) becomes ( L14 - L24 ) / L24 = k24 / k12
or L14 / L24 - 1 = k24 / k12
L14 / L24 = k24 / k12 + 1
L24 = L14 / ( k24 / k12 + 1 ) [everything on the right is known]

Similarly for L13 / L14

Edited by Buckeye

Share this post

Link to post
Share on other sites

FYI: The answer I posted was just the implementation of the formulae in the image you posted, after an infinite amount of time.


The question you originally posted is greatly different from implementing the model described in the pdf! The model is for a dynamic situation, changing over time (between the start and end points,) and, using your original post as an example, would take into consideration contraints and other forces on m2 and m3, possibly from other masses not shown. In your posted example, when m4 is moved, m2 and m3 will oscillate, and continue to oscillate after m4 has come to rest. If they're free to move without other constraint, eventually the damping will "stop" m2 and m3, and they will come to rest as I described. If you're not interested in the behavior of m2 and m3 between the start and end of their movement, the method in the article may not be what you're looking for.


With regard to modeling the system described in the article, you may find someone (other than me) that will work with you on that. I would, however, suggest that you fully understand what you really want to do, and whether implementation of that model is the correct approach.


Whatever you decide, I hope it works for you.

Edited by Buckeye

Share this post

Link to post
Share on other sites



I would like to help you implement a mass-spring-damper system, but as the above poster, I am a bit unsure what you want. Are you trying to implement an interactive simulation where the springs and masses move around in  real-time for the user to play with, or are you trying to impement a static, rigid system, where the masses move in an instant and then stand still until moved again?




Share this post

Link to post
Share on other sites

Thanks very much for reply. I would like implement the model describe in the article but I don't understand how to set up the model and how solve the equation. My idea was try to apply the model describe from the article on a mesh with few vertex and triangles, and my initial example was related to it.

If someone can help me to implement this model I appreciate.


Thanks to all.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!