constraint is what was generated for this vertex in buildConstraints(). The barrier() function is there because the algorithm runs in parallel, so it solves the constraint for odd vertices then waits for all threads to complete and then solves the constraints for even vertices.

I have looked through NVIDIAs DirectX implementation of the simulation (NVIDIAs SDK 11) and the only deviation from the constraint code was that when the first vertex is not root and the second is, the factors were (1.0f,0.0f). I am however not certain how the constraints were generated, so I predict that my mistake is somewhere there.

The actual problem is that after a while the simulation goes full spaghetti mode... To be a bit more precise - the control vertices seem to move from the root towards the tip and the tip seems to move away in the direction the force is applied... Here's what it looks like in point mode: