## 2 Materials and Methods
### Micro-Scale Surface Contouring via Micro-Laser Line Projection
To do so, the children (\(C_{1+4^{\circ}q,t}\), \(C_{2+4^{\circ}q,t}\), \(C_{3+4^{\circ}q,t}\),\(C_{4+4^{\circ}q,t}\)) are created via parents (\(P_{1+2^{\circ}q,t}\), \(P_{2+2^{\circ}q,t}\)) for \(q=0\) and \(q=1\). 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, the parents (\(P_{3,t}\), \(P_{4,t}\)) and \(q=1\) are replaced in Equations (7)-(10) to compute the children (\(C_{5,t}\), \(C_{6,t}\), \(C_{7,t}\), \(C_{8,t}\)). The third step is to evaluate the fitness. To do so, an objective function is constructed based on the known surface data and the vision parameters. The objective function is defined by means of the next expressions  
\[FO_{1}=\min\left\{\frac{1}{mxn}\sum_{i=0}^{n}\sum_{j=0}^{m}\left[(z_{i,j}-z_{i,m})-\frac{\eta(x_{c}-x_{i,j})F_{1}F_{2}}{(f_{1}-F_{1})(f_{2}-F_{2})sin\theta} +\frac{\eta(x_{c}-x_{i,m})F_{1}F_{2}}{(f_{1}-F_{1})(f_{2}-F_{2})sin\theta} \right]^{2}\right\} \tag{24}\]  
\[FO_{2}=\min\left\{\frac{1}{mxn}\sum_{i=0}^{n}\sum_{j=0}^{m}\left[(y_{i,j}-y_{i,m})+\frac{\eta(y_{c}-y_{i,j})F_{1}F_{2}}{(f_{1}-F_{1})(f_{2}-F_{2})}-\frac{ \eta(y_{c}-y_{i,m})F_{1}F_{2}}{(f_{1}-F_{1})(f_{2}-F_{2})}\right]^{2}\right\} \tag{25}\]  
From these equations, the fitness is computed by the expression \(FO=(FO_{1}+FO_{2})/2\). In this case, the surface topography (\(z_{i,j}-z_{i,m}\)) and the surface width (\(y_{i,j}-y_{i,1}\)) are known. The fourth step is to select the parents of the next generation. To do so, the best current parents and children are selected via fitness. Thus, the parents \(P_{1,t+1}\) and \(P_{3,t+1}\) are selected from the pairs (\(P_{1,t}\), \(P_{2,t}\)) and (\(P_{3,t}\), \(P_{4,t}\)), respectively. Then, the parents \(P_{2,t+1}\) and \(P_{4,t+1}\) are selected from the children (\(C_{1,t}\), \(C_{2,t}\), \(C_{3,t}\), \(C_{4,t}\)) and (\(C_{5,t}\), \(C_{6,t}\), \(C_{7,t}\), \(C_{8,t}\)), respectively. The fifth step is to perform the mutation to avoid trapping in a local minimum. To do so, the worst parent is selected by computing the fitness via Equations (24) and (25). Then, a new parent is randomly generated from the search space and the fitness is computed. If the new parent improves the fitness, the worst parent is replaced by the new parent, if not, the worst parent is not mutated. Additionally, a parent is randomly selected to mutate one vision parameter, which is selected in random form. To carry it out, a new vision parameter is randomly generated from the search space. Then, the new vision parameter is replaced in the selected parent and the fitness is computed via Equations (24) and (25). If the parent fitness is improved, the vision parameter is replaced by the new parameter, if not, the vision parameter is not mutated. Thus, the mutation of the current parents is completed and the parents of the (\(t+1\)) generation are determined. Then, the crossover is carried out to create the children of the (\(t+1\)) generation via Equations (7)-(10). In addition, the fitness of these children is computed via Equations (24) and (25). Thus, the population of the (\(t+1\)) generation is completed. The procedure to compute the (\(t+1\)) generation is repeated until the vision parameters (\(x_{c}\), \(y_{c}\), \(\eta\), \(\theta\), \(f_{1}\), \(F_{1}\), \(f_{2}\), \(F_{2}\)) that minimize the objective function Equations (24) and (25) are obtained. Additionally, the distance from zero to the point \(O\) is determined by the expression \(z_{0,j}=\eta(x_{0,j}-x_{c})\,F_{1}\,F_{2}/(f_{1}-F_{1})(f_{2}-F_{2})sin\theta\). The micro laser line coordinates (\(x_{i,j}\), \(y_{i,j}\)) are determined via pixel position and intensity. The coordinate \(x_{i,j}\) is computed through the maximum intensity in each row of the image [47].