## 2 Materials and Methods
### Micro-Scale Cylindrical Surface Modeling via Genetic Algorithm
To do so, the genetic algorithm computes the initial population of the parameters \((k_{0},l_{0},k_{n},l_{n})\) by means of the next expressions  
\[k_{0}=\frac{k_{i+\delta}(x_{n,j}-x_{0,j})(x_{i,j}-x_{0,j})-k_{i}(x_{n,j}-x_{0,j })(x_{i+\delta,j}-x_{0,j})}{[(x_{i,j}-x_{n,j})(x_{i+\delta,j}-x_{0,j})-(x_{i+ \delta,j}-x_{n,j})(x_{i,j}-x_{0,j})]} \tag{15}\]  
\[l_{0}=\frac{(k_{n}-k_{0})[l_{i+\delta}(k_{i}-k_{0})-l_{i}(k_{i+\delta}-k_{0}) ]}{(k_{i}-k_{n})(k_{i+\delta}-k_{0})-(k_{i+\delta}-k_{n})(k_{i}-k_{0})} \tag{16}\]  
\[k_{n}=\frac{k_{i}(x_{n,j}-x_{0,j})(x_{i+\delta j}-x_{n,j})-k_{i+\delta}(x_{n,j }-x_{0,j})(x_{i,j}-x_{n,j})}{(x_{i,j}-x_{0,j})(x_{i+\delta j}-x_{n,j})-(x_{i+ \delta,j}-x_{0,j})(x_{i,j}-x_{n,j})} \tag{17}\]  
\[l_{n}=\frac{l_{i+\delta}(k_{n}-k_{0})(k_{n}-k_{i})-l_{i}(k_{n}-k_{0})(k_{n}-k_ {i+\delta})}{(k_{i+\delta}-k_{0})(k_{n}-k_{i})-(k_{i}-k_{0})(k_{n}-k_{i+\delta})} \tag{18}\]  
For these equations, the sub-index \(\delta\) represents an increment in the \(x\)-axis, and the parameters \((k_{i},l_{i})\) are determined via surface data by means of the next expressions  
\[k_{i}=\frac{\mathcal{Z}_{1}[\mathcal{Y}_{4}+\mathcal{Z}_{4}]-\mathcal{Z}_{3}[ \mathcal{Y}_{2}+\mathcal{Z}_{2}]}{2[\mathcal{Y}_{3}\mathcal{Z}_{1}-\mathcal{Y }_{1}\mathcal{Z}_{3}]} \tag{19}\]  
\[l_{i}=\frac{\mathcal{Y}_{1}[\mathcal{Y}_{4}+\mathcal{Z}_{4}]-\mathcal{Y}_{3}[ \mathcal{Y}_{2}+\mathcal{Z}_{2}]}{2[\mathcal{Z}_{3}\mathcal{Y}_{1}-\mathcal{Z }_{1}\mathcal{Y}_{3}]} \tag{20}\]  
where, \(\mathcal{Z}_{1}=(z_{i,j+\Delta})-(z_{i,j})\), \(\mathcal{Z}_{2}=(z_{i,j+\Delta})^{2}-(z_{i,j})^{2}\), \(\mathcal{Z}_{3}=(z_{i,j+\kappa})-(z_{i,j})\), \(\mathcal{Z}_{4}=(z_{i,j+\kappa})^{2}-(z_{i,j})^{2}\), \(\mathcal{Y}_{1}=(y_{i,j+\Delta})-(y_{i,j})\), \(\mathcal{Y}_{2}=(y_{i,j+\Delta})^{2}-(y_{i,j})^{2}\), \(\mathcal{Y}_{3}=(y_{i,j+\kappa})-(y_{i,j})\), and \(\mathcal{Y}_{4}=(y_{i,j+\kappa})^{2}-(y_{i,j})^{2}\). In this case, the sub-indices \(\Delta\) and \(\kappa\) represent an increment in the \(y\)-axis. By computing Equations (15)-(18), four parents (\(P_{1,t}\), \(P_{2,t}\), \(P_{3,t}\), \(P_{4,t}\)) are determined for each parameter. The sub-index \(t\) indicates the generation number. Thus, the parent \(P_{1,1}\) is determined by computing Equations (15)-(18) via sub-indices (\(i=1,j=1\), \(\delta=n/4\), \(\Delta=m/2\), \(\kappa=2\Delta\)), the parent \(P_{2,1}\) is determined via sub-indices (\(i=n/4,j=0\), \(\delta=n/4\), \(\Delta=m/2\), \(\kappa=2\Delta\)), the parent \(P_{3,1}\) is determined via sub-indices (\(i=n/2,j=0\), \(\delta=n/4\), \(\Delta=m/2\), \(\kappa=2\Delta\)), and the parent \(P_{4,1}\) is determined via sub-indices (\(i=3n/4\), \(j=0\), \(\delta=n/4\), \(\Delta=m/2\), \(\kappa=2\Delta\)). In this way, four coordinates (\(k_{0}\), \(l_{0}\), \(k_{n}\), \(l_{n}\)) are obtained and they are defined as the initial population. Figure 3: Rectangular cylindrical surface to perform cylindrical surface modeling. Additionally, the ratio \(\bar{r}\) is defined as the average distance between the coordinates \((k_{i},l_{i})\) and the surface coordinates \((x_{i,j},y_{i,j},z_{i,j})\). Then, the genetic algorithm determines the search space based on the maximum and minimum of each parameter. For the parameter \(k_{0}\), the minimum and maximum are defined as \(y_{0,0}\) and \(y_{0,m}\), respectively. For \(k_{n}\), the minimum and maximum are defined as \(y_{n,0}\) and \(y_{0,m}\), respectively. For \(l_{0}\), the minimum and maximum are defined as \((l_{0}+\bar{r}/2)\) and \((l_{0}-\bar{r})\), respectively, where, \(l_{0}\) is computed via Equation (16). For \(l_{n}\), the minimum and maximum are defined as \((l_{n}+\bar{r}/2)\) and \((l_{n}-\bar{r})\), respectively, where, \(l_{n}\) is computed via Equation (18). Thus, the initial population is completed. The second step is to create the current children via crossover. To do so, two children are created inside parents and two children are created outside parents.