Rope physics with position constraints question
Posted: Mon Apr 08, 2013 5:23 pm
I apologize in advance for asking such a beginner question - I know almost nothing about physics but I couldn't find a better place to ask.
I have a simple rope made up of mass-spring system with pretty high spring constant (~5000). I'm using semi-implicit Euler integration with timestep of 0.003 seconds. It looks pretty good, but it feels like the timesteps have to be excessively small because I'm doing something stupid.
To make the 2 ends of the rope constrained to a moving object (the rope is the only thing driven with physics, not the object), I'm simply setting the positions of the 2 ends of the rope to be on the object surface at every timestep. I recently became aware of existence of "constraint solvers" (eg Lagrange multipliers) but it's way over my head and I don't understand what they are or what they do.
So here's my question: is what I'm doing (just forcing 2 end positions to whatever I want) a valid solution? Or is there something better that would allow me to increase timestep? Do I need to look into a "constraint solver", or does that only apply to rigid bodies and not to mass-spring system?
I have a simple rope made up of mass-spring system with pretty high spring constant (~5000). I'm using semi-implicit Euler integration with timestep of 0.003 seconds. It looks pretty good, but it feels like the timesteps have to be excessively small because I'm doing something stupid.
To make the 2 ends of the rope constrained to a moving object (the rope is the only thing driven with physics, not the object), I'm simply setting the positions of the 2 ends of the rope to be on the object surface at every timestep. I recently became aware of existence of "constraint solvers" (eg Lagrange multipliers) but it's way over my head and I don't understand what they are or what they do.
So here's my question: is what I'm doing (just forcing 2 end positions to whatever I want) a valid solution? Or is there something better that would allow me to increase timestep? Do I need to look into a "constraint solver", or does that only apply to rigid bodies and not to mass-spring system?