# An Effective Algorithm for Finding Shortest Paths in Tubular Spaces
## 4 The ESP Searching Algorithm Based on Visibility
### Geometric Properties of the ESP in Tubular Space
If the angle between \(\mathbf{p}(s_{X})\) and \((\alpha)\) is not zero, then the direction \(\mathbf{p}(s)\) at any point on the ESP segment between the cross-sections containing \(\mathbf{X}\) and \(\mathbf{Y}\) will always point away from \((\alpha)\)._  
Proof. : From \(\mathbf{X}\), the particle moves away from \((\alpha)\) (the angle between \(\mathbf{p}(s_{X})\) and \((\alpha)\) is not zero). Using Theorem 1, we obtain that the particle only changes its direction at points on the geodesic paths. As these curves must be on the surface of negative curvature (Theorem 2), where vector \(\mathbf{p}(s)\) points out of the tube, thus the \(\mathbf{p}(s)\) will always point away from the plane \((\alpha)\) (see Figure 6). **Corollary 2**. : _If \(\mathbf{X}\) on the ESP can see a cross-section \(S\) of the tubular space \(\Omega\) via a positive direction, the correct direction at \(\mathbf{X}\) (\(\mathbf{p}(s_{X})\)) must be towards a point \(\mathbf{Y}\) in the visible area of \(S\) by \(\mathbf{X}\)._  
Proof. : The above corollary can be proven by contradiction. By \(\sigma_{X}(S)\), we denote the visible area of the cross-section \(S\) by \(\mathbf{X}\). Let \(\mathbf{Y}\) be the intersection of the straight line containing \(\mathbf{p}(s_{X})\) and the plane containing \(S\) (denoted by \(\beta(S)\)). We need to prove that \(\mathbf{Y}\in\sigma_{X}(S)\). We consider the following hypothesis of contradiction:  
\[\text{if }\mathbf{Y}\
ot\in\sigma_{X}(S)\Rightarrow\overline{\mathbf{X}\mathbf{Y}}\
ot\subset\Omega \tag{4}\]  
In other words, the ray \(\mathbf{X}\mathbf{Y}\) passes through the boundary \(\partial\Omega\). Let \(\mathbf{M}\) be the passing point that is closest to \(\mathbf{X}\). In \(\beta(S)\) and through \(\mathbf{Y}\), we draw an arbitrary straight line that intersects with the visible area \(\sigma_{X}(S)\). Let \(\mathbf{W}\) be the intersection point that is closest to \(\mathbf{Y}\). Then, \(\mathbf{W}\) must be on the boundary of \(\sigma_{X}(S)\) (denoted by \(\partial\sigma_{X}(S)\)). In addition, there is a total of two relative positions of \(\mathbf{W}\): \(\mathbf{W}\in\partial\Omega\) and \(\mathbf{W}\
ot\in\partial\Omega\) (see Figure 7). In the following, we define a plane \((\alpha)\) and a closed surface \((C)\) for these two mentioned cases:  
* \((\mathbf{W}\
ot\in\partial\Omega)\). \((\alpha)\) is the plane that contains \(\mathbf{X}\mathbf{W}\) and the tangent at \(\mathbf{W}\) of \(\sigma_{X}(S)\). If \(\overline{\mathbf{X}\mathbf{W}}\) is not tangent to \(\partial\Omega\), we can always find in \(\beta(S)\) a circle with center \(\mathbf{W}\) and radius \(\epsilon\) small enough so that the entire circle can be seen by \(\mathbf{X}\) (as there is no obstacle between \(\mathbf{X}\) and this circle). Then, there exist points outside \(\sigma_{X}(S)\) (which is part of the circle) that can be seen by \(\mathbf{X}\). This contradicts the definition of \(\sigma_{X}(S)\). Thus, \(\overline{\mathbf{X}\mathbf{W}}\) is tangent to  
Figure 5: Curved segments lying on surfaces of positive and zero curvatures where A and B can see each other. \(\partial\Omega\). Let \(\mathbf{T}\) be the tangent point that is closest to \(\mathbf{X}\) and \(P_{T}(\partial\Omega)\) be the tangent plane of \(\partial\Omega\) at \(\mathbf{T}\). If \(P_{T}(\partial\Omega)\
ot\equiv(\alpha)\), \(P_{T}(\partial\Omega)\) will divide \(\sigma_{X}(S)\) into two subsets. However, as the line of sight of a visible point in \(\sigma_{X}(S)\) must pass through the cross-section of the tube at \(\mathbf{T}\), only then can one subset of \(\sigma_{X}(S)\) be observed by \(\mathbf{X}\). This contradicts the definition of \(\sigma_{X}(S)\). Thus, \(P_{T}(\partial\Omega)\equiv(\alpha)\). We can then define a closed surface \((C)\) enclosed by \((\alpha)\), the cross-section at \(\mathbf{X}\), and part of \(\partial\Omega\) which contains \(\mathbf{M}\) (see Figure 7 Left). * \((\mathbf{W}\in\partial\Omega)\). \((\alpha)\) is the plane that contains \(\mathbf{X}\mathbf{W}\) and the tangent at \(\mathbf{W}\) of \(S\).