Simulating Group Dynamics in Crowds of Pedestrians