 ### Nikhil Kumar

A stylish blog on my code

Google+ Gmail LinkedIn Github Résumé
Changelog:

# Crowd Simulation of Social Forces

In this post we will discuss the implementation of Social Forces in crowd simulations using SteerLite. The projects were created by a team of 3 as part of a class project for Introduction to Computer Graphics at Rutgers University.

## Demonstration

### Bottle Neck

Info In this simulation a crowd of agents needs to pass through a narrow opening of the room. The situation leads to many agents shoving each other to leave the room.

Bench Scores:

### One Way Hallway

Info In this simulation a crowd of agents needs to pass through a hallway. The agents are all traveling one direction. room.

Bench Scores:

### Two Way Hallway

Info In this simulation a crowd of agents needs to pass through a hallway. The agents are traveling in both directions. room.

Bench Scores:

### Four Way Hallway

Info In this simulation a crowd of agents need to pass through a four way intersection.

Bench Scores:

# Implementation

#### Sum of Forces:

This is the sum of all the forces that make up the Social Force.

#### Goal Directed Force:

This Force changes the speed and direction according to the direction of the goal.

We choose to divide the goal force by 5 so that it does not overpower other collision avoiding forces during cases such as the bottleneck test case. Here is a print out of the results before goal force was divided. We can see that the magnitude is roughly equal to the repulsion force. This is not good.

#### Agent Collision Avoidance Force:

$F_{ij}$ is the sum of forces of agent j on agent i
R is the Radii
d is the distance between centers of mass
A and B are constants

#### Wall Collision Avoidance Force:

$F_{iW}$ is the sum of forces of wall W on agent i
R is the Radii
d is the distance between centers of mass
A and B are constants

Github Link: Here