A simple particle based physics library with constraints for KPR