## 2 Materials and Methods
### Micro-Scale Spherical Surface Modeling via Genetic Algorithm
\tag{7}\]  
\[C_{2+4*q,l}=0.5\big{[}\big{(}P_{1+2*q,l}+P_{2+2*q,l}\big{)}-\beta\big{|}P_{1+2*q,l}-P_{2+2*q,l}\big{|}\big{]} \tag{8}\]  
\[C_{3+4*q,l}=0.5\big{[}\big{(}P_{1+2*q,l}+P_{2+2*q,l}\big{)}+\beta\big{|}P_{1+2*q,l}-P_{2+2*q,l}\big{|}\big{]} \tag{9}\]  
\[C_{4+4*q,l}=\left\{ \begin{array}{l}P_{2+2*q,l}+0.5\beta\big{|}\mathrm{ maximum}-P_{2+2*q,l},\text{ if }P_{1+2*q,l}<P_{2+2*q,l}\\ P_{1+2*q,l}+0.5\beta\big{|}\mathrm{maximum}-P_{1+2*q,l},\text{ if }P_{2+2*q,l}<P_{1+2*q,l} \end{array} \right. \tag{10}\]  
For these equations, the probability distribution \(\beta\) is accomplished via spread factor \(\alpha\), which is randomly generated in the interval between 0 and 1. Thus, the probability distribution is computed by the expression \(\beta=(2\alpha)^{1/2}\) if \(\alpha>0.5\), otherwise, \(\beta=[2(1-\alpha)]^{1/2}\). In this way, Equations (8) and (9) compute the children inside parents, and Equations (7) and (10) compute the children outside parents. By replacing the parents (\(P_{1,t}\), \(P_{2,t}\)) and \(q=0\) in Equations (7)-(10), the children (\(C_{1,t}\), \(C_{2,t}\), \(C_{3,t}\), \(C_{4,t}\)) are determined. In addition, by replacing the parents (\(P_{3,t}\), \(P_{4,t}\)) and \(q=1\) in Equations (7)-(10), the children (\(C_{5,t}\), \(C_{6,t}\), \(C_{7,t}\), \(C_{8,t}\)) are determined. The third step is to evaluate the fitness. To do so, an objective function is constructed based on the surface coordinates (\(x_{i,j}\), \(y_{i,j}\), \(z_{i,j}\)) and the current origin coordinates (\(h\), \(k\), \(l\)). The objective function is defined by means of the next expression  
\[FO=\min\Biggl{\{}\frac{1}{nxm}\sum_{i=0}^{n}\sum_{j=0}^{m}\left|\widetilde{R}- \sqrt{\left(x_{i,j}-h\right)^{2}+\left(y_{i,j}-k\right)^{2}+\left(z_{i,j}-l \right)^{2}}\right|\Biggr{\}} \tag{11}\]  
\[\widetilde{R}=\frac{1}{nxm}\sum_{i=0}^{n}\sum_{j=0}^{m}\left[\sqrt{\left(x_{i,j}-h\right)^{2}+\left(y_{i,j}-k\right)^{2}+\left(z_{i,j}-l\right)^{2}}\right]\]  
The fourth step is the selection procedure, which determines the parents of the next generation. To do so, the best current parents and children are selected via fitness. In this way, the parents \(P_{1,l+1}\) and \(P_{3,l+1}\) are selected from the pairs (\(P_{1,l}\), \(P_{2,l}\)) and (\(P_{3,l}\), \(P_{4,l}\)), respectively. Then, the parents \(P_{2,l+1}\) and \(P_{4,l+1}\) are selected from the children (\(C_{1,l}\), \(C_{2,l}\), \(C_{3,l}\), \(C_{4,l}\)) and (\(C_{5,l}\), \(C_{6,l}\), \(C_{7,l}\), \(C_{8,l}\)), respectively. The fifth step is to perform the mutation procedure to avoid trapping in a local minimum. To do so, the worst parent is selected by computing the fitness via Equation (11). Then, a new parent is randomly generated from the search space and the fitness is computed via Equation (11). If the new parent improves the fitness, the worst parent is replaced by the new parent. On the other hand, the worst parent is not mutated. Additionally, a parent is randomly selected to mutate one parameter, which is selected in random form. To do so, a new parameter is randomly generated from the search space. Then, the new parameter is replaced in the selected parent and the fitness is computed via Equation (11). If the parent fitness is improved, the new parameter is replaced, if not, the parameter is not mutated. Thus, the current parents' mutation is completed and the (\(t+1\)) generation parents are determined. Then, the crossover is performed to create the (\(t+1\)) generation children via Equations (7)-(10). In addition, the fitness of these children is computed via Equation (11). Thus, the population of the (\(t+1\)) generation is completed. The procedure to compute the (\(t+1\)) generation is repeated until the optimal parameters (\(h\), \(k\), \(l\)) that minimize the objective function FO are obtained. In this way, the spherical surface modeling is completed. To elucidate the surface modeling via genetic algorithm, a spherical surface model is constructed from the spherical surface shown in Figure 2a.