Constraint-based simulation of virtual crowds