# Uniform Circle Formation for Fully, Semi-, and Asynchronous Opaque Robots with Lights
## 4 Preliminary Steps  
This section shows some well-known preliminary actions to be taken by the swarm, which are summarized in the following:  
1. To form a regular \(n\)-gon, any robot in a swarm of \(n\) robots needs to know \(n\). This may be achieved by first solving the Complete Visibility problem, where all robots are asked from any given valid initial system configuration to reach a terminal configuration where each robot is visible to all others. At this point, \(n\) can be clearly computed at a glance. However, \(n\) cannot be stored by robots, since they are equipped with constant memory. Hence \(n\) will be somehow readily fixed in the topology of the swarm. A possible solution to Complete Visibility moves robots to the vertices of their convex hull. To this end, the algorithms in [39; 40] can be used in order to solve Complete Visibility on fsynch, sysch and asynch modes using a constant amount of time and colors.  
Figure 3: Safe chord between regular 3-tuples.  
Next, each robot takes its snapshot (_look_), computes the _smallest enclosing circle_ (SEC) e.g., by [PERSON]'s algorithm [41] (_compute_), and eventually moves radially towards the SEC (_move_). Clearly, such movements cannot collide, since each trajectory is radial to the same center. It might be the case that two robots (and, of course, no more than two) sit on the same radial trajectory. However, by computing distances from the two possible final destinations, they can easily choose to move in opposite directions and reach the two diametrically opposite locations. At the end of this preliminary phase, all robots lie on the SEC upon which the final regular \(n\)-gon will be formed. It is important to note that this SEC will not change along the whole execution of the algorithms. This step can be achieved in just one round/epoch, without any specific color light (i.e., they can maintain their current color).
3. Let \(C_{H}\) be the swarm configuration at this point, where all robots are vertices of a convex hull inscribed within their SEC. If \(C_{H}\) is a _perfect convex hull_[42], all robots lie on the edges of the associated regular \(\frac{n}{2}\)-gon (called _supporting polygon_, SP), two robots per edge. In this case, the regular \(n\)-gon can be easily set by making robots slide along the edges of the SP until they reach the vertices of the target \(n\)-gon. Given a perfect convex hull, the SP is unique and does not change while robots are sliding on its edges (this guarantees the correctness of this strategy also in the ssynch and asynch modes). So, each activated robot takes its snapshot (_look_), checks whether the system configuration forms a perfect convex hull and computes the SP (_compute_), eventually slides along the edge until it reaches the correct vertex of the regular \(n\)-gon (_move_). Notice that two robots on the same edge head in opposite directions, and therefore no collision occurs. Note that a _biangular configuration_ (a set of \(n\geq 2\) robots forms a biangular configuration if robots lie on a circle \(C\) centered on \(O\), and two non zero angles \(\alpha,\beta\) exist such that for every pair \(r\) and \(p\) of robots adjacent on \(C\), it holds that \(\widehat{OP}\in\{\alpha,\beta\}\) and \(\alpha\) and \(\beta\) alternate clockwise [42]) and a regular polygon pattern are special cases of perfect convex hull. Also in [30], the perfect convex hull and the biangular configuration are dealt with as special cases at the beginning of their algorithm. This possible preliminary step takes just one round/epoch, without changing the current color of the robots. After the previous three preliminary steps, two different scenarios can occur: either the configuration is already a regular polygon or \(C_{H}\) is not a perfect convex hull. In the first scenario, the algorithm ends. For the second scenario, the three strategies to form a regular polygon for the fsynch, ssynch, and asynch modes are now outlined.