**3. Algorithm and illustration**

In this section, a Delaunay triangulation-based method will combine the concepts of Ahuja-Dijkstra algorithm and ridge points to construct a directed graph and to obtain the shortest possible path length on the quadratic surfaces. Compared to another Delaunay triangulation method [4], Fermat points are replaced by the ridge points; this is mainly due to the fact that Fermat points cannot connect the shortest line between two neighbour triangles on the quadratic surface. The initial step of the algorithm is to build a triangle mesh *G* to simulate the earth's surface (the GIS map). Next, a source point and a destination point are spotted, then three ridge points in the same triangle will be connected together to generate an extra small triangle and three extra path segments between the vertices and neighbour triangles diagonal vertices.

These extra connections as shown in **Figure 1(b)** will be used to search for the near-shortest path by using the Ahuja-Dijkstras algorithm (expressed by *E*<sup>f</sup> ). As we have constructed the directed connected graph *G*′ = *G* ∪ *E*<sup>f</sup> , we can obtain the near-shortest path *P* in graph *G*′ if it exists.

**Function 1**: *FindingExtraConections*():

Step 1. Create a ridge point between two neighbouring triangles as shown in **Figure 1(a)**.

Step 2. Obtain the shortest path by connecting these two vertices *E, F* with the ridge point.

**END** {Function of *FindingExtraConections*}.
