# Uniform Circle Formation for Fully, Semi-, and Asynchronous Opaque Robots with Lights
## 5 The Algorithm for the Fully Synchronous Mode
### Cycle 1: Pivot Selection and Angle Setting
It is easy to see that \(w^{\prime}=w^{\prime\prime}\) implies a rotational symmetry, which will be dealt with later. So, the algorithm can establish the lexicographically smallest string between \(w^{\prime}\) and \(w^{\prime\prime}\), say \(w^{\prime}\), and choose \(p_{1}\), from which \(w^{\prime}\) starts, as the pivot around which to form the regular 3-tuple. As usual, let \(a_{1}\) and \(a_{2}\) be the positions of polygon vertices around \(p_{1}\) (see Figure 7). Figure 6: Regular tuple setting for symmetry case with one axis, odd \(n\). It is notable that the strings \(w^{\prime}\) and \(w^{\prime\prime}\) enable all robots to agree on a common _upper_ and _lower_ side of the main diameter (and of the SEC). Summing up, each robot \(r\) performs the following:  
* **Look-Compute**: \(r\) computes the axis of symmetry \(l\) (and hence the main diameter with the robots \(p_{1}\) and \(p_{2}\)) and the positions \(a_{1}\) and \(a_{2}\) around which they will form the regular 3-tuple. * **Move**: If \(r\) belongs to \(l\), it sets its color as _pivot_ and does not move. If \(r\) is intended for the position \(a_{1}\) or \(a_{2}\), it sets its color as _angle_ and moves there. Otherwise, \(r\) does nothing. Even \(n\) with no axis robots. In this case, \(l\) splits the SEC without passing through any robot. Let \(d\) be the main diameter laying on \(l\), and let \(d^{\prime}\) be the diameter perpendicular to \(d\). As in the previous case, by computing the arc angle-strings delimited by the endpoints of \(d\) and the endpoints of \(d^{\prime}\), robots can determine the upper (and lower) side of the SEC. So, in the upper side, robots form a _regular 4-tuple_, centered on \(l\), in the positions \(a_{1}\), \(p_{1}\), \(p_{2}\), \(a_{2}\), while in the lower side two robots reach the two endpoints \(a_{3},a_{4}\) of the polygon edge opposite to the 4-tuple and split by \(l\) (see Figure 8). It is evident that, in all this robot displacing, at most three robots per each half-SEC are involved. Moreover, although the whole robot swarm does not share a common orientation, each half-SEC is oriented. Furthermore, due to symmetry, the orientations in the two half-SECs are opposite. So, by Theorem 2, no collisions among moving robots arise. Summing up, each robot \(r\) performs the following:  
* **Look-Compute**: \(r\) computes the axis of symmetry \(l\) (and hence the main diameter) and the positions \(a_{1}\), \(p_{1}\), \(p_{2}\), \(a_{2}\), and \(a_{3}\), \(a_{4}\) of the vertices nearest to \(l\) in the regular \(n\)-gon. In particular, \(\overline{p_{1}p_{2}}\) and \(\overline{a_{3}a_{4}}\) will be the two opposite edges split by \(l\). Figure 8: Regular tuple setting for symmetry case with one axis, even \(n\) and no robots on the symmetry axis. Figure 7: Regular tuple setting for symmetry case with one axis, even \(n\) and two robots on the symmetry axis. * **Move**: If \(r\) is intended for the position \(p_{1}\) or \(p_{2}\), it sets its color as _pivot_ and moves there. If \(r\) is intended for the position \(a_{1}\), \(a_{2}\), \(a_{3}\), or \(a_{4}\), it sets its color as _angle_ and moves there. Otherwise, \(r\) does nothing. **Rotational symmetry. ** Let \(r_{0},\ldots,r_{n-1}\) be the sequence of adjacent robots on the SEC starting from an arbitrary robot, following a fixed orientation. If the related SEC angle-string \(\alpha_{0}\cdots\alpha_{n-1}\) can be factored into \(k\) identical factors up to rotation, then the convex hull on the SEC can be divided into \(k\) identical sectors, each being the \(\frac{2\pi}{k}\)-rotation of the previous one. Let \(P_{i}=\{r_{j}\mid j\equiv i\,\text{mod}\,\frac{n}{k}\}\) with \(0\leq i<\frac{n}{k}\) be the _class of symmetry_ which contains \(k\) robots sharing the same relative position in the \(k\) different sectors. Clearly, from all the robots in the same class \(P_{i}\), the same two SEC angle-strings, say \(w_{i}\) and \(w_{i}^{R}\), start in opposite directions.