Miarmy Crowd Simulation Documentation (English)

Relative Speed Detection

For getting more details on the relative velocity this topic, please reference Wikipedia http://en.wikipedia.org/wiki/Relative_velocity
We can use sphere range detect the nearby agents and fetch their relative velocity, and know if the near agent is approaching or leaving, also the direction relationship.
We'll decompose the velocity into the speed of X, Y, and Z, and use "+" or "-" to describe the approaching and leaving behavior.
In the following 4 examples we'll describe the relative speed of each agents:
Example 1: both agents' moving speeds are 3, and face to face,
If they are approaching (left picture), the relative velocity:

  • Speed X: 0
  • Speed Z: +6

If they are leaving (right picture), the relative velocity:

  • Speed X: 0
  • Speed Z: -6


Inverse direction (Left) approaching, (right) leaving


Example 2, the moving speed is 3, and face to face but in different direction
If they are approaching (left picture), the relative velocity:

  • Speed X: +3
  • Speed Z: +3

If they are leaving (right picture), the relative velocity:

  • Speed X: -3
  • Speed Z: -3


Cross direction (Left) approaching, (right) leaving


Example 3, the moving speed is 3, and face to back follow but in the same direction

  • Speed X: 0
  • Speed Z: 0


Relative speed is 0, both left or right agents


Example 4, the moving speed is 3, and face to face but in different direction
If they are approaching (left picture), the relative velocity:

  • Agent Blue: Speed X: +3
  • Agent Blue: Speed Z: 0
  • Agent Yellow: Speed X: 0
  • Agent Yellow: Speed Z: +3

If they are leaving (right picture), the relative velocity:

  • Agent Blue: Speed X: -3
  • Agent Blue: Speed Z: 0
  • Agent Yellow: Speed X: 0
  • Agent Yellow: Speed Z: -3

 


The blue agent is still no moving, and yellow one passed him


Language
The agent can only detect only one near agent in his sphere range for relative speed. So please use this carefully.

  • someone in my sphere with relative speed X
  • someone in my sphere with relative speed Y
  • someone in my sphere with relative speed Z

 

 

 

 

 

 

 

 

 

 

 

Basefount Technology