# Planar Delaunay Mesh Smoothing Method Based on Angle and a Deep Q-Network
## 4 Results and Discussion
### Effectiveness Analysis  
Example 1 is a polygon with a central node of one and neighboring nodes of six. The comparison before and after smoothing using the proposed method in Example 1 is shown in Figure 10. From the comparison results, it is clear that the optimization effect of the proposed method is obvious.  
As shown in Figure 11, the node quality of Example 1 was stable at 0.92 after the central node moved 20 steps, which proves that the model converges, and the node quality converges to the local optimal position.  
As shown in Figure 12, it is the convergence of the inner polygon as it moves with the central node. It can be observed that as the quality of the nodes increased, the size of the inner polygon decreased and moved toward the center of the polygon. The polygon within  
Figure 11: Node quality convergence graph.  
Figure 10: Example 1 smoothing front-back diagram. (**a**) Before smoothing; (**b**) after smoothing.  
the central node is a weak constraint, moving toward improving the quality of the node, proving that the updated inner polygon helps improve the node's quality.  
The effectiveness analysis of the proposed method and the node quality convergence analysis were performed for Example 1 above. The following three types of mesh for quarter mechanical components were used to demonstrate the effectiveness of using constrained DQN models for mesh smoothing. As shown in Figure 13, in Example 2, after constrained DQN smoothing, the minimum angle increases, the shape of the poor element is improved, and the optimized mesh is more regular than the initial mesh. Example 3 has many poor elements, as shown in Figure 14. After optimization, the poor elements were eliminated, and the transition effect between elements of different sizes was significantly improved. As shown in Figure 15, the mesh quality of Example 4 is high and has a good mesh size gradient. After smoothing, the angle of the element was improved, and the mesh size gradient was better controlled.  
The minimum angle, maximum angle, minimum quality, and average quality before and after smoothing for the above three examples are shown in Table 3. The minimum angle, maximum angle, and minimum quality were significantly improved for all three examples. The average quality of Examples 2 and 3 increased after optimization, but the average quality of example 4 decreased slightly.  
Figure 12: Inner polygon convergence graph.  
Figure 14: Effectiveness of Example 3 comparison before and after smoothing. (**a**) Before smoothing; (**b**) after smoothing.  
\begin{table}
\begin{tabular}{c l c c c c c} \hline \hline
**Mesh** & **State** & **Nodes** & **Min. 0** & **Max. 0** & **Min. q** & **Avg. q** \\ \hline \multirow{3}{*}{2} & Before smoothing & \multirow{3}{*}{619} & 18.3706 & 129.4545 & 0.4802 & 0.8632 \\  & After smoothing & & 34.1760 & 99.4288 & 0.7810 & 0.9279 \\  & Before smoothing & & 17.8954 & 128.0146 & 0.5009 & 0.7906 \\  & After smoothing & & 34.9065 & 93.8188 & 0.8173 & 0.9361 \\  & Before smoothing & & 33.1073 & 98.6044 & 0.7962 & 0.9677 \\  & After smoothing & & 37.6581 & 91.6064 & 0.8517 & 0.9629 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Table of comparison before and after mesh smoothing.  
Figure 13: Effectiveness of Example 2 comparison before and after smoothing. (**a**) Before smoothing; (**b**) after smoothing.  
As mentioned above, the constrained DQN model can effectively eliminate poor elements, improve mesh quality and minimum angle of elements, and control the gradient of mesh size when smoothing the mesh.