# 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
Such a robot assumes the color _pivot_, and the formation of the regular 3-tuple around \(p\) takes place as above. Opposite to \(p\), the regular polygon edge perpendicular to \(D\) must be formed. So, two robots will reach the endpoints \(a_{3}\) and \(a_{4}\) of such an edge, assuming the color _angle_ (see Figure 5). Note that, in each half-SEC, exactly two robots move to their vertex destinations. Again, (a trivial adaptation of) Theorem 2 ensures safe robot travel. Summing up, each robot \(r\) performs the following:  
* **Look-Compute**: \(r\) unambiguously spots the pivot position \(p\) on the main diameter. Furthermore, it computes the positions \(a_{1}\), \(a_{2}\), \(a_{3}\), \(a_{4}\) and the robots intended for these positions. * **Move**: If \(r\) is in the pivot position \(p\), then it does not move and sets its color as _pivot_. 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. Figure 4: Pivot and angles for the asymmetrical case (even \(n\)). Figure 5: Pivot and angles for the asymmetrical case (odd \(n\)). **Symmetry with exactly one axis. ** Let \(l\) be the only axis of symmetry in \(C_{H}\). Note that two or more symmetry axes yield a rotational symmetry, that is considered in the next case. The diameter of the SEC lying on \(l\) will be the _main diameter_. Three cases are considered: odd \(n\), even \(n\) with two axis robots (i.e., robots on the symmetry axis), and even \(n\) with no axis robots. Odd \(n\). In this case, \(l\) passes through a robot, which will be the pivot \(p\), and splits the opposite edge of the polygon. So, \(l\) divides the SEC into two symmetrical halves, each with \(\frac{n-1}{2}\) robots (\(p\) excluded). Now, the algorithm aims to create the regular 3-tuple around \(p\), as well as to set two robots at the endpoints of the regular \(n\)-gon edge opposite to \(p\). Therefore, two robots in each half-SEC must be moved. Even in this case, Theorem 2 ensures no crossing trajectories. However, to apply Theorem 2, an orientation is necessary; in this case, it can be trivially settled in each half-SEC as being the direction from the pivot to the other endpoint of the diameter laying on the axis \(l\) (namely, the main diameter). To determine which robots in each half-SEC must move to the vertices of the polygon, the algorithm can choose, e.g., the last robots according to such an orientation. As in the asymmetrical case discussed above, let \(a_{1}\) and \(a_{2}\) be the positions of the two polygon vertices around \(p\), while \(a_{3}\) and \(a_{4}\) are the positions of the two vertices of the polygon edge opposite to \(p\) (see Figure 6). 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},a_{2},a_{3},a_{4}\) of the polygon vertices. * **Move**: If \(r\) is on \(l\), it sets its color as _pivot_ and stays still. 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. Even \(n\) with two axis robots. In this case, \(l\) passes through two opposite robots, which will be the two pivots \(p_{1}\) and \(p_{2}\). The diameter on \(l\) is the main diameter, as above. The axis \(l\) divides the SEC into two symmetrical halves, each with \(\frac{n-2}{2}\) robots (\(p_{1}\) and \(p_{2}\) excluded). First of all, one of the two pivots must be selected, around which to form the _regular 3-tuple_. To this end, let \(e_{1}\) and \(e_{2}\) be the two endpoints of the diameter which is perpendicular to the axis \(l\). Each robot computes the angle-strings \(w^{\prime}\) and \(w^{\prime\prime}\) obtained, respectively, by traveling from \(p_{1}\) to \(e_{1}\) and from \(p_{2}\) to \(e_{2}\). Notice that \(w^{\prime}\) and \(w^{\prime\prime}\) remain the same even if \(e_{1}\) and \(e_{2}\) are switched, due to the symmetry axis \(l\).