# Research on the Calculation and Analysis of Ski-Track Areas Based on Laser Point Clouds
## 3 Calculation of Ski Track Area
### Point Cloud Boundary Extraction for Ski Tracks  
In the Graham scanning method, the ski-track boundary is the smallest convex polygon containing all point clouds [31; 32; 33; 34; 35; 36; 37]. This polygon cannot show the details of the ski-track edge and retains the gap outside the ski track, preventing accurate calculation of the ski-track area. In view of the above problems, this paper proposes an improved ski-track point cloud boundary extraction algorithm. If the external gap of the ski-track point cloud data boundary is to be proposed, the outermost triangle filtering threshold needs to be set, and all external triangles are filtered in a clockwise manner. Whenever the side length of the external triangle exceeds the threshold, the triangle is considered to be an external gap and is eliminated. During the traversal of the irregular triangulation, the external triangle is gradually traversed from the outside to the inside. In the event that any side of the external triangle is less than the threshold, the search can be terminated. As a result of the search, there may be triangles whose side lengths exceed the threshold, which do not need to be removed. The cause of this phenomenon may relate to the intersection of ski runs. For the point cloud data density, it may be beneficial to retain these triangles in order to improve the stability of the ski-track point cloud boundary extraction algorithm. The original triangulation is shown in Figure 3a; the pink part of the triangulation represents the triangulation that needs to be optimized. The optimized triangulation is shown in Figure 3b. Implementation of the algorithm consists of the following steps:  
1. To construct a 2D triangulation of the ski-track point cloud obtained by projection in Section 2, the growth algorithm described in Section 3.1 is applied.  
2. A threshold of D is applied to the outermost triangle filtering and the outer triangles (i, i+1,...) are traversed from the outside to the inside of the irregular triangular network. The retrieval can be stopped if all the edges of the outer triangles are less than the threshold.  
3. In order to preserve the coordinates of the endpoints of the outermost triangle, the corner points of each edge are retained in order according to the outer contour.  
Based on the above-mentioned improved ski-track point cloud boundary extraction algorithm, the polygon formed by the boundary of each layer of point cloud is extracted. Based on the coordinates of the boundary endpoints, the discrete Green formula [38], as shown in Equation (2), is used to calculate the area of the polygon of the ski run.  
\[\begin{split} S&=\frac{1}{2}\sum_{i=1}^{m}[x_{i}(y _{i+1}-y_{i})-y_{i}(x_{i+1}-x_{i})]\\ &=\frac{1}{2}\sum_{i=1}^{m}[x_{i}y_{i+1}-y_{i}x_{i+1}]\end{split} \tag{2}\]  
Figure 2: Triangulation network based on improved growth algorithm.  
Among these, \(S\) represents the total area of the extracted ski track, m represents the total number of points along the boundary of the ski track, \((x_{i},y_{i})\) represents the plane projection coordinates of point \(i\), and \((x_{i+1},y_{i+1})\) represents the plane projection coordinates of point \(i+1\).