## 3 Proposed Methods
### The Continuous Object Area Computation
#### 3.2.2 Refine the Enclosed Area with Mobile Sensors
Different moving step sizes \(\lambda\times\gamma_{max}\,{}_{10\,<\,\lambda\,\leq\,1}\) will be evaluated in the simulation section. In addition, the proposed algorithms design a moving freeze mechanism to prevent the sensors from overcorrecting their positions. The vertex goes back to its original position and becomes stationary when it detects its status change during its movement. The refinement moving procedure of MDT terminated when all vertices in set \(\Psi_{o}{}^{d}\cup\Psi_{i}{}^{d}\) become stationary. In MCH, \(\Psi_{i}{}^{d}\) and \(\Psi_{o}{}^{d}\) are replaced as \(\Psi_{i}{}^{\ell^{\prime}}\) and \(\Psi_{o}{}^{\ell^{\prime}}\), respectively. Algorithm 1 shows the completed MDT algorithm. Figure 3: Moving direction of a position-adjusting sensor. (**a**) The MDT determines a sensor’s moving direction according to the vectors to the other two sensors of the same triangle, which is constructed by the Delaunay triangulation architecture. (**b**) The MCH determines a sensor’s moving direction according to the vectors of all neighboring sensors that have a different set of convex hull. * MCH: Refine by updating the boundary nodes. MCH can refine its enclosed area further. There are still many obNodes near the boundary of the continuous object but not belonging to set \(\Psi_{o}{}^{c^{\prime}}\) after using mobile sensors to refine the bounded area. For each vertex \(S\mid S\in\Psi_{o}{}^{c^{\prime}}\), MCH traces every neighboring obNode \(Q\) of \(S\) to refine the size of the bounded area. For any one-hop neighboring obNode \(Q\) of \(S\in\Psi_{o}{}^{c^{\prime}}\), if the detecting status of \(S\) and \(Q\) are the same, replacing \(S\) with \(Q\) can reduce the enclosed area size. MCH substitutes \(Q\) for \(S\) to be the new boundary node. However, the following cases will not update the MCH's boundary node. The first case is that the selected \(S\) cannot find another neighbor \(Q\) within its communication range. There is no other choice for updating the boundary node. The second case is that the selected \(S\) has only a one-hop neighbor \(Q\mid|Q\in\Psi_{o}{}^{c}\) and \(Q\in\Psi_{o}{}^{c^{\prime}}\). This neighbor \(Q\) has already been the boundary node. So, updating the boundary node is unnecessary. The last one is that the selected \(S\) has more than two one-hop neighbors \(Q\,|\,[Q\in\Psi_{o}{}^{c}\) and \(Q\in\Psi_{o}{}^{c^{\prime}}]\), but the area of the created convex hull does not enclose these neighbors. Using them as boundary nodes will increase the bounded area instead of refining it. The Algorithm 2 is the completed MCH algorithm. ``` V : set of the deployed nodes \(\Psi_{i}:\) the iNode set \(\Psi_{o}:\) the oNode set \(\Psi_{i}{}^{c^{\prime}}:\) the ibNode set \(\Psi_{o}{}^{c^{\prime}}:\) the obNode set \(\Psi_{o}{}^{c}:\) the one-hop neighbor of the nodes in \(\Psi_{i}{}^{c^{\prime}}\) \(\gamma\): the moving step size \(E_{s}(u)\): the detecting status of node \(u\) \(Q\).Lock: the lock status of node \(Q\) (\(Q_{X}\),\(Q_{Y}\)): the coordinates of node \(Q\) (\(Q^{\prime}\),\(\chi\),\(Q^{\prime}\)): the last coordinates of node \(Q\)
1. For all node \(u\in\mathrm{V}\)
2. Verify the \(E_{s}(u)\) and Classify \(u\) into sets \(\Psi_{i}\) and \(\Psi_{o}\)
3. Applies the Graham scan algorithm to obtain the convex hull of nodes in \(\Psi_{i}\) and put the nodes constructing the convex hull as set \(\Psi_{i}{}^{c^{\prime}}\)
4. For all node \(v\in\)\(\Psi_{i}{}^{c^{\prime}}\)
5. Find any one-hop neighbor \(w\in\Psi_{o}\)
6. Put \(w\) to set \(\Psi_{o}{}^{c}\)
7. Applies the Graham scan algorithm to obtain the convex hull of nodes in \(\Psi_{o}{}^{c}\)
8. Put the nodes constructing the convex hull as set \(\Psi_{o}{}^{c^{\prime}}\)
9. While (\(\exists\)\(Q\in\)\(\Psi_{i}{}^{c^{\prime}}\), \(\Psi_{o}{}^{c^{\prime}}\)) and \(Q\).Lock == false)\(\{\)
11. If (\(Q\in\Psi_{i}{}^{c^{\prime}}\)) and (\(Q\) has at least one-hop neighbor \(N\in\Psi_{o}{}^{c^{\prime}}\)) or (\(Q\in\Psi_{o}{}^{c^{\prime}}\)) and(\(Q\) has at least one-hop neighbor \(N\in\Psi_{i}{}^{c^{\prime}}\)) \(\{\)
12.