## 3 Graphical Analysis Method of the Mode Shape
Then, we created an image array I (601, 705, 3) and transformed 423,705 pixels in the image to the coordinate value (\(y\), \(z\)) of the rail cross-section. Based on the coordinate values, the vibration displacement of each pixel is solved by the difference equation of a triangular element. First, we need to know whether the coordinate is located inside the triangle element. This is judged by the method of equal area, as shown in Figure 9.  
The three vertices of the triangle element are \(P_{i}\), \(P_{j}\), and \(P_{k}\), and its area is \(A\). The points, \(P\), \(P_{i}\), \(P_{j}\), and \(P_{k}\), form three new triangles, with the areas of \(A_{1}\), \(A_{2}\), and \(A_{3}\), respectively. If the point, \(P\), is inside the triangle element, it should satisfy \(A=A_{1}+A_{2}+A_{3}\). The coordinates of the three vertices of the triangle element are denoted as \(P_{i}(y_{i}\), \(z_{i})\), \(P_{j}(y_{j}\), \(z_{j})\), \(P_{k}(y_{k}\), \(z_{k})\), and the area of the triangle is calculated using Equation (7):  
\[A=\frac{1}{2}(y_{i}(z_{j}-z_{k})+y_{j}(z_{k}-z_{i})+y_{k}(z_{i}-z_{j})) \tag{7}\]  
For any triangular element, the displacement values of each node are solved from Equation (1). If the displacement values of the three nodes are known, the displacement value of any point inside the triangular element is obtained by the difference of Equation (2). For example, in Figure 9, the displacement values of three vertices (nodes) are, respectively: (\(u_{ix}\), \(u_{iy}\), \(u_{z}\)), (\(u_{jx}\), \(u_{iy}\), \(u_{jz}\)), (\(u_{kx}\), \(u_{ky}\), \(u_{kz}\)). The displacement values of point \(P\) in triangular elements (\(u_{x}\), \(u_{y}\), \(u_{z}\)) are obtained as Equation (8):  
\[\left\{ \begin{array}{l}u_{x}=N_{i}u_{ix}+N_{j}u_{jx}+N_{k}u_{kx}\\ u_{y}=N_{i}u_{iy}+N_{j}u_{iy}+N_{k}u_{ky}\\ u_{z}=N_{i}u_{iz}+N_{j}u_{iz}+N_{k}u_{kz}\end{array} \right. \tag{8}\]  
Figure 9: The determination method of the triangle element interior point. where \(N_{i}\), \(N_{j}\), and \(N_{k}\) are triangular element shape functions as Equation (9):  
\[\left\{ \begin{array}{l}N_{i}=\frac{1}{2A}(\alpha_{i}+\beta_{i}y+\delta_{i}z)\\ N_{j}=\frac{1}{2A}(\alpha_{j}+\beta_{j}y+\delta_{j}z)\\ N_{k}=\frac{1}{2A}(\alpha_{k}+\beta_{k}y+\delta_{k}z)\end{array} \right. \tag{9}\]  
where \(A\) is the area of the triangle element, which is obtained as Equation (7), and \(\alpha\), \(\beta\), and \(\delta\) are intermediate coefficients as Equation (10):  
\[\left\{ \begin{array}{l}\alpha_{i}=y_{j}z_{k}-y_{k}z_{j}\\ \beta_{i}=z_{j}-z_{k}\\ \delta_{i}=y_{k}-y_{j}\\ \alpha_{j}=y_{k}z_{i}-y_{i}z_{k}\\ \beta_{j}=z_{k}-z_{i}\\ \delta_{j}=y_{i}-y_{k}\\ \alpha_{k}=y_{i}z_{j}-y_{j}z_{i}\\ \beta_{k}=z_{i}-z_{j}\\ \delta_{k}=y_{j}-y_{i}\end{array} \right. \tag{10}\]  
The displacement values of all pixel points are calculated according to Equation (8). They are normalized to obtain the pixel values of the interval \([0,255]\). The images of the four mode shapes in Figure 7 are obtained by calculation, as shown in Figure 10.  
The main vibration position of the mode is clearly seen from Figure 10. When there is no vibration, the pixel value is 0, presented as the black image. According to the brightness, the displacement of the vibration is estimated. After generating the RGB image, the vibration mode can be analyzed by using the general image processing algorithm. Figure 10: RGB image of four guided wave modes at the frequency of 35 kHz. (**a**) RGB image of mode 2; (**b**) RGB image of mode 3; (**c**) RGB image of mode 7; (**d**) RGB image of mode 10.