## 2 Materials and Methods  
### Three-Dimensional Line-of-Sight Analysis Using Ray Casting  
In this study, a 3D model-based LOS analysis algorithm that can be applied to closed spaces, such as underground mines, was developed using Python. For the analysis of 3D models, Open3D, an open-source library that supports the easy processing of 3D data, was employed. Realistic 3D models can be built via numerous methods, and various technologies and tools have been used to model underground spaces. Light detection and ranging (LiDAR) is a technology that uses lasers to measure distances in the surrounding environment; it is the most representative method for creating a 3D model of an underground space. Structure from motion (SfM) is another technology that creates 3D models using images captured from various angles; it has become immensely popular because of its good compatibility with drones. However, in the SfM application process, the camera position and direction must be estimated, and the image must be sufficiently bright. Therefore, its usability in underground spaces is low. In this study, scanning was performed at multiple points within the target mine using terrestrial LiDAR. The separate models were then combined to create a single 3D model. Recently, with the development of simultaneous localization and mapping (SLAM) technology, 3D models can be built easily, even in underground spaces where GPS connections are not available, by tracking the location of the robot and considering the direction and tilt of the equipment. In this study, to analyze the constructed 3D model of an underground mine, a file in.obj or.stl format was first loaded using the Open3D library. Subsequently, LOS analysis was performed on the points in the 3D model using the ray-casting algorithm provided by the Open3D library. However, the spacing of points in the original data was not constant, and several areas contained very few points. Therefore, herein, points were generated uniformly from the mesh such that the algorithm could be applied to points that were distributed as evenly as possible. Note that for denser points, although the model can be expressed more precisely, more data processing is also required. Ray casting, a key algorithm for LOS analysis, involves determining intersections with other objects by emitting light with a starting point and direction in digital space. If a line of light intersects another object, it is deemed to collide with the object. The ray-casting algorithm in Open3D provides 3D coordinates of the point where a collision occurs. In this study, rays were emitted from points in a 3D point cloud to extract the coordinates of points that collided with the face of the 3D mesh. Figure 1 shows the process of obtaining the coordinates of the point where light collides with a circle or square in 2D space; here, rays do not reach the space behind the circles and squares, and these points do not have an LOS from the observation point. Here, the data processing efficiency is improved because unnecessary calculations are not required for points that are not visible from the observation point. Although Figure 1 shows a 2D image, ray casting was performed on a 3D mesh model, and the 3D coordinates of the colliding points were obtained. These collision points corresponded to areas where communication was possible from the observation point because the LOS was connected to the observation point. In ray casting, the direction of ray emission, field of view (FOV), and number of rays are crucial parameters. The FOV describes the viewable area that can be imaged using a lens system, and it can be adjusted in Open3D by setting the angle value. Assuming that the number of rays is the same, for a narrower FOV, the spacing between rays is narrow; thus, more collision points can be obtained per unit area. However, a disadvantage to this is that the area that can be analyzed simultaneously is narrower. For example, the FOV shown in Figure 1 is \(90^{\circ}\).