Calculation and iteration procedure for physical engines

I am writing a physics engine that uses Verlet integration, and I cannot get some restrictions for it to work properly. Some (for example, bond / weld limitation) are additional raw and not rigid enough, while others (for example, area limitation) are additional elastic and send atoms. The code for my update in my physical simulator is as follows:

    ProcessRemovedItems();
    ProcessAddedItems();
    _colliderManager.Update(timestepSize);
    foreach (Atom atom in _atomList)
    {
        atom.Update(timestepSize);
    }
    for (int i = 0; i < _iterations; i++)
    {
        foreach (IConstraint constraint in _constraintList)
        {
            constraint.Update();
        }
    }

I tried all the same combinations of update orders, and none of them helped. I have a vague idea of ​​using iterations, but I don’t know what else will help. Any suggestions?

+3
1

.

- , ).

, : , 5 , , . , . , , (- ). , , .

, ( , ), ,

, , . , ,

+3

Source: https://habr.com/ru/post/1720669/


All Articles