So, Point In Triangle testing based on Distance(PITD) algorithm is presented in the paper.
In the following subsections, the base principle of PITD is analyzed and the pseudo code of PITD is described firstly.
Unlike APIT, the testing errors of which largely depend on the node density of the network, the testing accuracy of PITD is greatly affected by the distances estimation errors.
The pseudo code of the PITD algorithm is as follows:
Algorithm 1:Point In Triangle testing based on Distances(PITD) Input:
Point in triangle testing is completed by the algorithm PITD and APIT both.
As for PITD algorithm, The error percentage stays almost constant, around 10%, under the same distances estimation errors because the accuracy of PITD does not depend on the node density.