## 4 Digital Model of the Area of Interest
### Algorithm for Creating a Network of Mobile Sensory Units  
Suppose that the polygon \(P\) of the area of interest is given. Polygon \(P\) contains significant points \(r_{0},r_{1},\cdots,r_{n}\) a \(r_{0}=r_{n}\). All the necessary significant points that belong to the set \(M_{S}\) are vertices of the polygon \(P\). In a digital model of the terrain is given point \(O=[0,0,0]\). According to this point, the coordinates of the points are given \(r_{i}=[x_{i},y_{i},z_{i}]\)  
**Algorithm 3:** Creating a network of sensory units.
```
input :\(P\)--polygon of the area of interest is given with significant points \(r_{0},r_{1},\cdots,r_{n}\) where \(r_{0}=r_{n}\). The set of significant points \(S^{\prime}\), the set of necessary significant points \(M_{S^{\prime}}\) and the set of internal significant points \(V_{S^{\prime}}\). Digital model of terrain \(A\), \(range(s)\)--the reach of the sensory element, \(\tau\)--sensitivity of the sensory element. output :\(Q\)--polygon of the area of interest, which contains points \(q_{0},q_{1},\cdots,q_{k}\) and \(q_{0}=q_{k}\) which form the network of sensory units. 1. for \(i=1,\cdots,n\) 2. \(j=i-1\), point selection \(r_{j}\in P,Q_{j}=\emptyset\) 3. \(l\)=1, \(k=1,\ q_{k}=r_{j}\) 4. \(k=k+1\) 5. if \(|r_{j}-r_{j-1}|\leq\tau\times range(s)\) then \(q_{k}=r_{j},\ j=j+1,\ l=l+1\) (see, point I. on the Figure 4) 6. if \(|r_{i}-r_{i-1}|>\tau\times range(s)\) then if \(r_{i}\in M_{S^{\prime}}\) then \(q_{k}=r_{j},\ j=j+1,\ l=l+1\) (see, point II. on the Figure 4)  if \(r_{i}\
ot\in M_{S^{\prime}}\) then it is possible (there is no obstacle between the points \(r_{j}\) and \(D\)) \(q_{k}=D,\ j=j+1,\ l=l+1\) if there is an obstacle between the points \(r_{j}\) and \(D\), then \(q_{k}=r_{j},\ j=j+1,\ l=l+1\) (see, point III. on the Figure 4) 7. if \(i<n\) then go to 2 (in this step the polygon \(Q_{j}\) with vertices \(q_{1},q_{2},\cdots,q_{l}\) was created) 8. if \(i=n\) then \(Q=Q_{k},\ |Q_{k}|=\min_{i=1,\cdots,n}|Q_{i}|\).
```  
**Algorithm 4** Creating a network of sensory units.  
Figure 3: The area of interest polygon.  
Cases I, II and III from Figure 4 show the procedure for creating a network of sensory units. Coordinates \(x,y\) are elements of the matrix \(A\) of the digital terrain model (see Figure 3).  
Note: Point \(D\) lies on the line \(r_{i}\) and \(r_{i+1}\) at a distance of \(2\times range(s)\). Point D is not a significant point.  
Brief description of the algorithm: We have a cycle considering the variable \(j\) in which we select the vertices of the polygon \(P\). According to points 5-7. we create a polygon \(Q_{j}\), with vertex \(r_{j-1}\). Polygons \(Q_{j}\) contain a set of necessary significant points and other points where sensory units are located. In point 8, we determine the polygon, which contains the smallest number vertices from that set of polygons \(Q_{1},\cdots,Q_{n}\).  
This method finds a polygon \(Q\) such that the length of the polygon is \(p(Q)\leqq p(P)\) and the number of vertices of \(Q\) is less than or equal to the number of vertices of \(P\). The polygon \(Q\) is a digital model of the boundary of the area of interest, the vertices of the polygon define the location of the sensor units in the area of interest.