# Position-Based Formation Control Scheme for Crowds Using Short Range Distance (SRD)
## 3 Proposed Algorithms
### Proposed Algorithms
#### 3.3.1 Short Range Destination (SRD)
In the original distance constraint of the PBD, if two moving objects have a distance constraint, both objects move to satisfy the distance constraint. However, in our formation constraint, which is set between an agent and the SRD, only the agent is allowed to move. Figure 8 compares the distance constraint with the formation constraint. Figure 8a shows when two objects are moving together to satisfy a distance constraint. Figure 8b shows when an agent moves to reach an SRD to satisfy a formation constraint. Here, the SRD and the position of the agent are expressed as \(s_{i}\) and \(p_{i}\), respectively. In Figure 8b, the \(s_{i}\) is not changed by constraint for formation. That is, only the agent moves to satisfy the constraints when the distance between \(p_{i}\) and \(s_{i}\) has increased to more than \(d\). This ensures that, even if an agent leaves the formation, it can still regain the formation by returning to the original SRD. Figure 9 illustrates the movement of two blue agents that chase their SRDs to form a formation. Note that the blue agents are in the same group as the white ones. Additionally, the positions of the SRDs, which relate to the formation constraint, are based on the group position. When the group position is moving, the SRDs are moving as well. The amount of translation of the SRDs is decided by the amount of movement in group positions. Equation (4) shows the changes in the positions of the SRDs, and Figure 10 is a graphical representation of this chain rule. Note that the frame time \(\Delta t\) goes from \(0\) to \(1\) in Figure 10.  
In addition to these schemes, to enhance the realism of the simulation, it was necessary to consider agent-specific characteristics. To represent the different behaviors of the agents, each agent can have the following different parameters: speed, agility, and reaction time. Agent-specific parameters can be easily seen when they are not under a formation constraint because they can go to their targets independently. However, when they are  
Figure 8: Comparison of traditional distance constraint and formation constraint: (**a**) traditional distance constraint, (**b**) formation constraint. under formation constraint, all agents must consider their neighboring agents to keep the formation, which requires agents to adjust their given parameters. We define agility as a factor that determines how quickly an agent can perform avoidance behavior. The higher the value of agility, the faster it can avoid obstacles. Finally, the reaction time is defined as how quickly the agent reacts to dynamic obstacles. A high reaction time value means that the agent sees an obstacle in the distance and reacts quickly to leave the formation, or quickly determines that there is no obstacle and returns to the formation. Figure 11 shows that the agent slowly loses formation as they move at different speeds in the absence of formation constraints. More details can be found in the result video (result video is video S1 in the Supplementary Materials). Figure 11: The movement of agents without formation constraints. The white lines attached to each agent are not visible in the actual simulation, but are drawn for illustration purposes. These lines represent the speed magnitude of the agent, with longer lines being faster and shorter lines being slower. Figure 10: The movement of SRDs as a result of the group’s movement and each agent tracking each target. The SRDs move as much as the group has moved. \[\Delta p_{i}=-\lambda\
abla p_{i}C(p_{1},\ \ldots,\ p_{n}) \tag{6}\]0 Movement of agents to reach their SRD. Agents away from their SRD are colored blue.