DevO wrote:
This should be 3 point constrain only.
The only tricky part is actually properly creating this constrains.
The should be just like distance constrains that are used to replace bending constrains but are using middle point too.
Oh ok thanks for that.
One more thing, you didnt tell me how i should refer you in the code.
I have just written special thanks to DevO for his help. Do u want to add in your real name and affiliation?
Ok done. I have committed the final pbd version. You can checkout from svn.
One more thing, if I were to extend it to 3d meshes, how do i create the constraints? I think i would have to create a tetrahedral mesh first and then assign distance constraints to the three shared edge (p2p3, p0p3 and p1p3) and one bend constraint(p2p1) assuming the base of the tetrahedron is p0p1p2 and p3 is the apex vertex as given in the following figure,
Hi DevO.
THanks for the KahanSum stuff. I will run it on my system first thing tomorrow morning. By the way, could u elaborate a bit more on this as this is quite new for me. I assume it is something to do with the floating point inaccuracies during summations however I m not sure. An expert advice would be interesting.
Apart from this, is the pbd implementation (the latest svn one) correct.
Another thing, what about using pbd for soft bodies any ideas how to go about it?
WOW, using KahanSum the behaviour is more accurate as compared to not using the KahanSum.
DevO I am grateful to you for pointing this out. I didnt know about this and the errors numerical inprecision generates. Thanks man.
Can you elaborate a bit more about the KahanSum and where you added it to the PDB algorithm - maybe a simple example? I will look at the code after this, but it might be nice to discuss this in isolation. I looked at Wikipedia and it seems to deal with Cancelation problems. Good stuff DevO
Thanks for sharing these cloth implementations, it will be helpful.
For FEM, you can also buy the 'Game Physics Pearls' book, and check out chapter 10.
I recently extracted the corotational linear fem implementation from OpenTissue (removed BOOST and only use the necessary code) here: https://github.com/erwincoumans/experiments (there is a Download button) and check out the dynamics/corotational_fem folder.
You can build it under Windows using Visual Studio 2008/2010 by clicking on the build/msvc2008.bat batchfile and open the new folder.
fem_gwen.png
I plan to add some collision detection to it. You could use it to simulate cloth as well (thick cloth of a single layer of tetrahedra)
Cheers,
Erwin
You do not have the required permissions to view the files attached to this post.
1. The force between two points are not constant even during the discrete time step. We already know that the force is changing as a result of moving points. The good thing is that we can compute how much the force will change during the time step. Unfortunately it is a function of point velocity and we don't know this until we integrate! So those two information (force change rate and point velocities) are strongly coupled together. That is why we need to solve a linear equation in implicit method.
2. If one point is moving towards the other point, we know that the force change rate is a vector with the same direction of the two points. However, if the point is moving perpendicular to the line of two points, there is still change of force. In this case, the force change rate is dependent on the point velocity direction but not the same direction. So the force change rate is always vector and the relationship with point introduces some 3x3 matrix which is Jacobian matrix. For real-time simulation, we can ignore the perpendicular case, then the Jocobian matrix is no longer needed because the force change rate will be always the same direction as the line of two points. This makes it possible to implement implicit integration without solving linear equation. Below paper explains this concept.