<<

arXiv:0904.2550v1 [cs.CG] 16 Apr 2009 ersne sapolyhedron a as represented w onson points two path hssre,w osdrtecs hr discrete a where of case representation the surface consider we survey, this ahbtentopit on shortest points The two ge- between path differential . in computational problem and ometry well-studied a is space idn hretptsadsots itne be- surface distances a on shortest points and tween paths shortest Finding Introduction 1 three- polyhedral on surfaces. focuses dimensional survey three-dimensional The on surfaces. distances and paths compute to geodesic relevant practically and cally Phr yCnyadRi sn euto rm3- from reduction using be Reif to and Canny shown by is hard 3D NP in obstacles polyhedral between poly- on surfaces. distances hedral and paths geodesic find to been applied have geometry computational from and methods graph Therefore, in graph space. a as three-dimensional viewed be can Further- surface discrete extended. the more, and differential discretized from be can algorithms However, geometry applied case. be this cannot in distances com- and paths to differen- geodesic geometry pute be differential cannot from methods surfaces tiated, discrete Since space. hssre ie re vriwo theoreti- of overview brief a gives survey This h eea rbe fcmuigasots path shortest a of problem general The ntesraeadtesots itnebetween distance shortest the and surface the on edscPtsO DSrae:Sre n pnProblems Open and Survey Surfaces: 3D On Paths Geodesic S sdntda denoted is S S S sgvn Namely, given. is P nlMhswr tfneWuhrer Stefanie Maheshwari Anil edscdistance geodesic sdntda denoted is nthree-dimensional in nthree-dimensional in geodesic S In . is 1 ar fvrie in vertices of pairs lem as known orevertex source tex h adoko opttoa emty[ Geometry Computational in of in found Handbook be paths the can geodesic spaces higher-dimensional to and related two- survey A face and morphing, recognition. and mapping texture without control, fic trace traf- studying can flow, water arm analyzing obstacles, robotic hitting a path the finding efficient example, to most applied For be can problems graphics. path geodesic and as design, such cir-cuit areas (GIS), systems various information in geographic , applied is surfaces hedral in solvable is it time. and polynomial problem easier an is surface dral onson points ah(PP problem (APSP) path reuvlnl,fidn h edscptsfo all from in paths vertices geodesic source the finding equivalently, or rbe fcmuiggoei ah on the paths consider geodesic only computing will of problem we Hence, of path. length geodesic (weighted) the the measuring by known is path tde rbesae()fidn h edscpath geodesic the vertex source finding one from (a) are commonly problems most three studied The destination studied. and been source have of points number the on depending A [ SAT optn edscptsaddsacso poly- on distances and paths geodesic Computing oeta h edscdsac ewe n two any between distance geodesic the that Note rbeso niggoei ah n distances and paths geodesic finding on Problems n c nigtegoei ah ewe all between paths geodesic the finding (c) and , d 10 ∈ .Cmuigagoei aho polyhe- a on path geodesic a Computing ]. P P igesuc hretpt SS)prob- (SSSP) path shortest source single b nigtegoei ah rmone from paths geodesic the finding (b) , a eesl eemndi h geodesic the if determined easily be can s ∈ P P ooedsiainvertex destination one to P oaldsiainvrie in vertices destination all to . nw as known , s ∈ P ooedsiainver- destination one to l-ar shortest all-pairs P . 31 d ]. ∈ P P , , The algorithms reviewed in this survey are com- graph theoretic algorithms. To obtain a good under- pared by means of the following five categories: standing of the reviewed algorithms, we first review • Accuracy of the computed geodesic path. some well-known graph theoretic algorithms. Dijkstra proposed an to solve the SSSP • Cost metric used to compute the geodesic path. problem on a directed weighted graph G(V, E) with The cost metric can be the Euclidean distance n vertices, m edges, and positive weights [13]. Dijk- or a weight function (for example when going stra’s algorithm proceeds by building a list of pro- uphill is more costly than going downhill). cessed vertices for which the shortest path to the • Space of the algorithm. source point s is known. The algorithm iteratively decreases estimates on the shortest paths of non- • Time complexity of the algorithm. processed vertices, which are stored in a priority • Applicability of the algorithm by surveying if queue. In each iteration of the algorithm, the clos- the algorithm has been implemented and tested est unprocessed vertex from the source is extracted in practice. from the priority queue and processed by relaxing all its incident edges. The notion of relaxation under- Approximation algorithms are compared accord- lines the analogy between the length of the shortest ing to their approximation ratio (or approximation path and the length of an extended tension spring. factor) k. An algorithm that finds approximations to When the algorithm starts, the length of the short- a geodesic path with approximation ratio k returns est path is overestimated and can be compared to a path of length at most k times the exact geodesic an extended spring. In each iteration, a shorter path. path is found, which can be compared to relaxing To solve the problem of computing geodesic the spring. Although the original implementation paths on discrete surfaces, two different general ap- requires O(n2) time, the running time can be de- proaches can be used. First, the polyhedral surface creased to O(n log n+m) by using Fibonacci heaps. can be viewed as a graph and algorithms to com- Thorup [45] presented an O(m)-time algorithm in pute shortest paths on graphs can be extended to case where each edge is assigned a positive integer find geodesic paths on polyhedral surfaces. Algo- weight. The main idea is to use a hierarchical buck- rithms following this approach are reviewed in Sec- eting structure to avoid the bottleneck caused by sort- tion 2. Second, the polyhedral surface can be viewed ing the vertices in increasing order from s. as a discretized differentiable surface and algorithms The length of a path on S depends on the em- from can be extended to find ployed cost metric. Hence, the shortest or geodesic geodesic paths on polyhedral surfaces. Algorithms path on S depends on this cost metric. In Section 2.1, following this approach are reviewed in Section 3. geodesic path algorithms with Euclidean cost metric At the end of each section, open problems related to are reviewed. Using the Euclidean cost metric im- the section are summarized. plies that the Euclidean length of the path is used to measure the length of the path. In Section 2.2, 2 Graph-Based Algorithms geodesic path algorithms on weighted surfaces are reviewed. Using a weighted cost metric implies This section reviews algorithms to compute geodesic that different faces of S can be weighted differently. shortest paths that can be viewed as extensions of Clearly, any algorithm that can solve a shortest path

2 problem using a weighted cost metric can also solve est path can be computed as the straight line joining the same problem using the Euclidean cost metric. s and p after unfolding the faces adjacent to the edge sequence to a plane. The authors aim to subdivide P 2.1 Euclidean Cost Metric with respect to a given source point s, such that the shortest path from s to any other point in P can be When using the Euclidean distance along a poly- found efficiently. They define ridge points x of P as hedron P as cost metric, shortest paths consist of points that have the property that there exists more straight line segments that cross faces of the polyhe- than one shortest path from s to x and prove that dron. An approach to compute shortest paths on P the ridge points can be represented by O(n2) straight aims to compute a superset of all the possible edges line segments. The algorithm partitions the boundary of shortest paths on P and to use this information to of P into at most n connected regions called peels compute shortest paths. Since all of the algorithms not containing any vertices or ridge points of P . The pursuing this strategy are mainly of theoretical in- boundaries of peels contain only ridge points, ver- terest to establish bounds on the number of possible tices, and edges of P . The algorithm to construct edges of shortest paths on P , they are not discussed the peels is similar to Dijkstra’s graph search algo- in detail in this survey. The algorithm’s pursuing this rithm. The peels are then iteratively unfolded to the approach are less efficient than the ones surveyed. plane. The algorithm first preprocesses P by con- A good overview of the algorithms finding edge se- structing the peels with respect to s in O(n3 log n) quences is given by Lanthier [25, p. 30–35]. time. The algorithm stores the computed peels in a We first review algorithms that only operate on the tree called slice tree that can then be used to deter- surface of a convex . Second, we review mine the shortest path between an arbitrary point on algorithms that operate on the surface of any (convex P and s in O(n) time. The slice tree or non-convex) polyhedron. uses O(n2) space. Mount [34] improves the algorithm by Sharir and Convex Polyhedra Schorr both in terms of time and space complexity. The main observation by Mount is that the peels de- This section discusses algorithms that operate on the fined by Sharir and Schorr can be viewed as Voronoi surface of a convex polyhedron P with n vertices. regions of a point set R containing the planar un- Shortest paths according to the Euclidean cost metric foldings of the source point s. Note that R contains are considered. at most n points per face of P because there are at Sharir and Schorr [42] proposed an algorithm that most n peels intersecting a face of P . Mount ob- computes the exact shortest path between points on serves that the shortest path from s to any point x on the surface of P . The proposed algorithm is mainly P is at most the shortest path from x to any point based on three observations. First, any shortest path r ∈ R plus the distance between r and s along the intersecting an edge e of P enters and leaves e under planar unfolding of the path. This observation de- the same angle. Second, no shortest path on a convex pends on the convexity of P and on the fact that all P can pass through a vertex p of P unless shortest paths unfold to polygonal chains consisting p is the destination or source of the shortest path. of straight line segments. Mount uses this observa- Third, if the sequence of edges of P intersected by tion to prove that the Voronoi regions of R are iden- the shortest path between s and p is known, the short- tical to the peels of P with s as source point. An

3 algorithm following the outline of Dijkstra’s algo- imate the shortest path on P . The algorithm can be rithm is used to compute the point set R and simul- extended to approximately solve the SSSP problem taneously, the Voronoi regions of R. Using this ap- in O(n log n) time. That is, starting from one source proach, P can be preprocessed with respect to s in point, the algorithm computes approximations with O(n2 log n) time and O(n2) space. The space re- approximation ratio 2 to all other points on P . quirement to store the data structure after building it Har-Peled et al. [17] extend the algorithm by Her- can be reduced to O(n log n) by storing O(n) differ- shberger and Suri to obtain an approximation ratio ent but similar lists of size O(n) each in an efficient of (1 + ǫ) for 0 <ǫ< 1. The algorithm is based on way to avoid redundancy. Note that building the data the approximation scheme by Dudley [14] that ap- structure still requires O(n2) space. The query time proximates the minimum number of sets required to to compute a shortest path from an arbitrary point approximate every set as ǫ-approximation. The al- p ∈ P to s is reduced to O(k + log n), where k is the gorithm by Har-Peled et al. proceeds by expanding number of faces of P intersected by the shortest path P by a factor related to ǫ and to the approximation by using an output sensitive data struc- obtained by Hershberger and Suri’s algorithm. De- ture. Mount [35] reduced the space requirement to note the expanded polygon by P ′. The shortest path build the data structure storing the between two vertices on P is approximated on a grid to O(n log n) by building a hierarchical structure on between the boundaries of P and P ′. Since the intersections between edges of P and geodesic P is convex and since the path is not in the inte- paths starting from s. The data structure stores for rior of P , the length of the path cannot be shorter each edge e of P a tree whose leaves contain the in- than the true shortest path. The path obtained by this tersections between e and geodesic paths crossing e method can be projected to P while ensuring that the in order. Common sub-trees of different edges are length of the path does not grow. The running time 1 1 1 shared to reduce the space complexity. of the algorithm is O(n min( ǫ1.5 , log n)+ ǫ4.5 log ǫ ) To avoid the high time complexity of finding and hence depends both on n and ǫ. As the algo- geodesic paths, Hershberger and Suri [18] propose rithm by Hershberger and Suri, this algorithm can an algorithm that finds an approximate shortest path be extended to approximately solve the SSSP prob- between two points on the surface of P . The algo- lem. The running time of the extended algorithm is n 1 rithm takes only O(n) time and has an approxima- O( ǫ4.5 (log n + log ǫ )). Although the theory used tion factor of 2. The main idea of the algorithm is by Har-Peled et al. is rather technical, the algorithm to extend the notion of bounding boxes to a gen- itself is simple. Agarwal et al. [2] improved the eral simplified representation of P and to compute running time of the algorithm to approximate one the shortest path between two points on this sim- shortest path by an approximation ratio of (1 + ǫ) 1 1 plified shape. To compute a shortest path between by Har-Peled et al. to O(n log ǫ + ǫ3 ). This im- s and t, the faces containing the source and desti- proves the running time of the algorithm to approxi- n n nation points are extended into planes, and at most mately solve the SSSP problem to O( ǫ3 + ǫ1.5 log n). O(n) different planes are added to the two planes Har-Paled [15] presents a further improvement of the to obtain a wedge. The shortest paths between the running time of this algorithm. After preprocessing two points are computed on each of these wedges in the in O(n) time, an (1+ǫ) approx- O(1) time as a wedge has constant description size. imation of the shortest path between two vertices is log n 1 The shortest path that was found is used to approx- reported in O( ǫ1.5 + ǫ3 ) time. This improves the

4 running time of the algorithm to approximately solve projecting the computed graph onto the surface of P . log n 1 the SSSP problem to O(n(1 + ǫ1.5 + ǫ3 )). Agarwal et al. implemented and tested this algorithm Recently, Schreiber and Sharir [39] proposed an and the algorithm by Hershberger and Suri [18] for exact solution to the SSSP problem on convex poly- artificial data sets with up to almost 100000 faces. hedra in 3-dimensional space. The algorithm ex- The following problems related to computing Eu- tends Dijkstra’s algorithm to allow continuous up- clidean shortest paths on the surface of a convex dates. That is, a wavefront is propagated from the polyhedron remain unsolved: source s along the boundary of P and the wavefront • Can SSSP problem on convex polyhedra is updated at events that change the topology of the be solved in O(n log n) time using O(n) wavefront. Note that a similar technique of continu- space [39]? ous Dijkstra updates was used in [34]. The general idea of the continuous Dijkstra technique was for- • Can an efficient trade off between the query mally described by Mitchell et al. [32] and is re- time and the space complexity be estab- viewed later in this survey. An implicit represen- lished [39]? tation of the solution is computed in optimal time O(n log n). The implicit representation is stored us- General Polyhedra ing O(n log n) space. Afterwards, the shortest path from the source to any point on P can be reported in This section discusses algorithms that operate on the O(log n + k) time, where k is the number of faces of surface of a polyhedron P with combinatorial com- P crossed by the path. plexity n. Note that P need not be convex. Short- est paths according to the Euclidean cost metric are Schreiber [38] extends the previous approach by considered. The main problem that occurs when al- Schreiber and Sharir [39] to so-called realistic poly- lowing non-convex polyhedra is that geodesic paths hedra. Realistic polyhedra are defined as three from s to t on P may pass through a vertex p of P . classes of non-convex polyhedra. The first class of O’Rourke et al. [37] extend the algorithms by realistic polyhedra have a boundary that forms a ter- Sharir and Schorr [42] and Mount [34] to obtain rain whose maximal facet slope is bounded by a con- the first algorithm that finds the exact geodesic path stant. The second class of realistic polyhedra has between two vertices of an arbitrary polyhedron in the property that each axis parallel square with edge polynomial time. Both the source and the destination length l that has distance at least l from P is inter- point of P are considered to be vertices of P . The al- sected by at most a constant number of faces of P . gorithm considers the problem in two steps. First, the The third class of realistic polyhedra has the prop- straight-line distances between all pairs of vertices of erty that for each edge e of P of length |e|, there are P are found. This is achieved by extending the tech- at most a constant number of faces within shortest nique to compute peels in [42]. Second, the short- path distance O(|e|). est distance between the source and the destination Agarwal et al. [1] propose an algorithm to com- vertex is found on the graph induced by the vertices pute a (1 + ǫ) approximation of the shortest path be- of P . The algorithm takes O(n5) time to compute n 1 tween two vertices that uses O time and O 4 ( √ǫ ) ( ǫ ) one shortest path on P . Since the complexity of the space. The approach proceeds by constructing a running time is high, the algorithm is irrelevant for graph, computing the shortest path on this graph, and practical purposes and has not been implemented.

5 Mitchell et al. [32] formalize the technique called tinuous Dijkstra technique can be used with differ- continuous Dijkstra previously used in [34] to find ent update schemes to obtain new algorithms, as we shortest paths from a source point s on the surface of saw for convex polyhedra [39]. Although the con- a convex polyhedron. The algorithm traverses the tribution by Mitchell et al. is rather technical, the graph induced by P similarly to the graph explo- algorithm is of practical interest as well. Recently, ration of a graph G in Dijkstra’s algorithm. Edges of Surazhkhy et al. [44] implemented and tested the P behave like nodes in G. Since the distance from algorithm on data sets obtained using a laser-range s on P to an edge e is not unique, e is labeled by scanner. Although the worst-case running time of a function describing the distance from s to e. The the algorithm is O(n2 log n), Surazhsky et al. found algorithm keeps track of a subdivision of e with the the algorithm’s average running time in their experi- property that for two points p and q in the same re- ments to be much lower and suitable for objects with gion of e, the shortest paths from s to p and from s hundreds of thousands of triangles. The exact algo- to q pass through the same sequence of vertices and rithm by Mitchell et al. is then modified to obtain an edges of P . Mitchell et al. observe that these sub- algorithm that solves the SSSP problem with approx- divisions of e resemble the peels used in [42]. How- imation ratio (1 + ǫ). Surazhsky et al. derive from ever, special care needs to be taken when comput- their experiments that an average running time of ing this subdivision, since geodesic paths emanating O(n log n) can be expected in practice for bounded from s can pass through a vertex p of P . In this approximations from one source point to all the other case, p is treated as a pseudo-source. The pseudo- points of the mesh. source p is labeled by the geodesic distance from s Chen and Han [11] developed an algorithm to to p. For any point x of P , the geodesic distance compute geodesic distances from a source point s is the minimum of the shortest distance from s to x on a non-convex polyhedron that does not use the not passing through a vertex of P and the geodesic continuous Dijkstra technique. The algorithm con- distance from the nearest pseudo-source of P to x structs a tree called sequence tree that can be viewed plus the label of the pseudo-source. This observa- as an extension of the of the tree con- tion allows to compute the subdivision of s and to taining ridge points used by Sharir and Schorr [42] store for each region of the subdivision the distance to non-convex polyhedra. In the case of a convex to the nearest pseudo-source. For a given source ver- polyhedron, the sequence tree T contains nodes con- tex s, the algorithm computes a subdivision of P in sisting of an edge e of P , the image of s in the lo- O(n2 log n) time and O(n2) space. Once the sub- cal coordinate system of the face incident to e, and division has been computed, the distance from s to the projection of the image onto e. Chen and Han any other point on P can be computed in O(log n) prove that T has a linear number of nodes, contains time. Reporting the shortest path between s and any all of the shortest paths, and can be built in O(n2) other point on P takes O(k + log n) time, where k time. For non-convex polyhedra, T contains addi- is the number of faces of P crossed by the shortest tional leaves representing pseudo-sources of P (as path. If the algorithm is initialized with more than defined by Mitchell et al. [32]) and the distances of one source point, the subdivision obtained after the pseudo-sources from s. This augmentation of T adds continuous Dijkstra algorithm ended represents the at most O(n) nodes. Hence, the algorithm builds a Voronoi diagram of the source points. Mitchell et sequence tree in O(n2) time and O(n) space. After al.’s algorithm is of theoretical interest, since the con- T was computed, the geodesic distance between s

6 and any point in P can be reported in O(log n) time. ning times of both algorithms is independent of the The geodesic path can be reported in O(log n + k) choice of ǫ. The main idea of the algorithm is to par- time, where k is the number of faces of P crossed by tition the boundary of the simple polyhedron P into the path. Kavena and O’Rourke [20] implemented patches of faces of P . A graph Gi is constructed and tested the algorithm on synthetic data. The im- on the boundary of each patch Pi. The graphs Gi plementation confirms the quadratic time complexity are merged into one graph G and the geodesic paths and the linear space complexity in practice. The ex- on P are approximated by the solution of Dijkstra’s periments show that roundoff errors are not a serious algorithm on G. Although this is the first paper to problem for this algorithm. Kavena and O’Rourke break the quadratic time complexity, the contribution found the space complexity to be the bottleneck of is mainly of theoretic interest because the algorithm the algorithm. Data sets with tens of thousands of is involved. Hence, the algorithm has not been im- points were used to test the algorithm. plemented. Har-Peled [16] extended his previous ap- Kapoor [21] presents an algorithm that solves the proach to compute (1 + ǫ) approximations of problem of computing the exact shortest path be- geodesic paths on realistic polyhedra [15] to tween a pair of points on P in sub-quadratic time. work in case of general polyhedra. Given a The algorithm follows the continuous Dijkstra tech- source point s, the algorithm computes a sub- nique by Mitchell et al. [32] and propagates a wave- division of P of size O n log 1 in time front over the surface of P starting from a source ǫ ǫ  O n2 log n + n log 1 log n . In the special point s. The algorithm maintains the wavefront ǫ ǫ  ǫ  case of convex polyhedra, the preprocessing time as a collection of circular arcs with centers at s n 3 1 n 1 and pseudo-sources of P . Furthermore, the algo- becomes O log + 1 5 log log n .  ǫ  ǫ  ǫ . ǫ   rithm maintains all of the edges of P that have not After this preprocessing step, a (1 + ǫ) approx- yet been reached by the wavefront. The algorithm imation of the shortest path between s and any takes O(n log2 n) time and O(n) space. According point p on P can be reported in O log n ǫ  to O’Rourke [36], the details of the algorithm are time. This implies that a (1 + ǫ) approxima- “formidable”. It is therefore not surprising that the tion to the SSSP problem can be obtained in algorithm contains some flaws [39]. O n2 log n + n log 1 log n + n log n time. ǫ ǫ  ǫ  ǫ  Kanai and Suzuki [19] propose an iterative ap- In 1997, Agarwal and Varadarajan [3] proposed proximation algorithm to compute the shortest path an algorithm that answers the question of whether it between pairs of points on P . The algorithm is is possible to compute an approximate shortest path based on Dijkstra’s algorithm and iteratively refines between two points on polyhedra in sub-quadratic the mesh in regions where the path can pass. The re- time. The proposed algorithm only works for poly- finement proceeds by placing Steiner points on edges hedra of genus zero. Two algorithms using the of P and to repeat Dijkstra’s algorithm on the aug- same general technique were proposed. The first mented graph. The user gives two thresholds re- algorithm computes an approximation to the short- lated to the accuracy of the approximation. The first est path with approximation ratio 7(1 + ǫ),ǫ > 0 5 5 threshold defines the number of times the algorithm in O(n 3 log 3 n) time. The second algorithm takes iterates. The second threshold is related to the num- 8 8 only O(n 5 log 5 n) time, but the approximation ratio ber of Steiner points placed on an edge of P . The au- increases to 15(1 + ǫ),ǫ > 0. Note that the run- thors implement the algorithm and compare it to an

7 implementation of Chen and Han’s algorithm. They an approximation of the shortest path with approx- 8 W find their algorithm to outperform Chen and Han’s imation ratio (1 + ǫ) using O(n log(nN wǫ )) time algorithm both in terms of time and space complex- and O(n4) space, where N is the largest integer co- W ity. ordinate of any vertex in the subdivision and w is The following problems related to computing Eu- the ratio between the maximum and the minimum clidean shortest paths on the surface of a possibly weight. To our knowledge, this algorithm has not non-convex polyhedron remain unsolved: been implemented. This is not surprising, since the high time complexity makes the algorithm unsuitable • Can the exact shortest path between a pair of for practical purposes. vertices on P be computed in O(n log n) time Lanthier et al. [26, 27] developed an approach to using O(n) space? construct a graph that can be searched to obtain an approximate shortest path on P by adding Steiner • Can the SSSP problem be solved in O(n log n) points on each edge of P . Without loss of generality, time and O(n) space? the authors assume P to be triangulated. A total of O(n2) Steiner points are added, yielding space com- 2 2.2 Weighted Cost Metric plexity O(n ) for all of the algorithms. Four algo- rithms are presented. The first algorithm computes This section discusses algorithms that operate on the the shortest path between two arbitrary points on P surface of a possibly non-convex polyhedron P with by finding shortest paths in the graph containing ver- combinatorial complexity n in 3-dimensional space. tices of P and the added Steiner points. The com- Unlike in Section 2.1, the length of the shortest path puted shortest path is at most WL longer than the is not simply measured by its Euclidean length. In- true weighted shortest path on P , where W is the stead, a weight wi is associated with each face fi maximum weight and where L is the longest edge of 5 of P . The length of a path crossing fi is its Eu- P . The running time of this algorithm is O(n ). Sec- clidean length multiplied by wi. The weights can ond, a faster and less accurate algorithm is presented be used to model the difficulty of the path. For ex- to compute the shortest path between two arbitrary ample, it is harder to walk on an uneven terrain than points on P by computing a spanner on the graph on an asphalt road. A good overview of algorithms containing the Steiner points and by finding a short- related to weighted shortest paths can be found in est path on the spanner. The computed shortest path Lanthier [25]. has length at most β(π + WL), where π is the true Mitchell and Papadimitriou [33] present an algo- weighted shortest path on P and β > 1 is a con- rithm to compute the shortest path distance between stant. Third, algorithms were presented to process P two arbitrary points in a planar subdivision with n for queries asking for shortest paths between a fixed edges. They note that shortest paths obey Snell’s source point s in P and an arbitrary point q in P . Law of refraction at edges of the subdivision. The al- The query time is proportional to log n and the ac- gorithm is based on this observation and the continu- curacy of the shortest path. Fourth, algorithms were ous Dijkstra technique formalized in [32]. Therefore, presented to process P for queries asking for shortest the authors note that the algorithm can be extended paths between two arbitrary points in P . The query to compute weighted shortest paths on the surface of time is proportional to log n and the accuracy of the possibly non-convex polyhedra. The algorithm finds shortest path. For the query algorithms, time-space

8 trade off schemes are presented. The authors imple- (1 + ǫ). That way, a graph G is constructed. An ex- mented and tested all of the algorithms on both real- tension of Dijkstra’s algorithm can be run on G to life and synthetic data sets. Experiments showed that obtain a (1 + ǫ) approximation of shortest paths on 2 n 1 1 in practice, much less than n Steiner points suffice P . The algorithm takes O( ǫ log ǫ ( √ǫ + log n)), for to yield acceptable results. 0 <ǫ< 1 and O(n log n) for ǫ ≥ 1 time to compute Lanthier et al. furthermore present an algorithm the shortest path between two arbitrary vertices on that runs in O(n log n) time that computes a shortest P . 2 path withing a factor of 1+ , where Θmin Sun and Reif [43] improve the algo-  sinΘmin  is the minimum interior angle of any face of P [27, rithm by Aleksandrov et al. [6] to run in Theorem 3.1]. O( n log 1 + log n log 1 ) time. This improvement ǫ ǫ  ǫ Aleksandrov et al. [5] presented an algorithm to is achieved by solving the SSSP problem on the compute an approximation of a weighted geodesic graph enhanced by Steiner points using a new path on arbitrary polyhedra with approximation ra- algorithm called Bushwhack algorithm. The Bush- tio (1 + ǫ). The algorithm is similar to [26] in that whack algorithm is similar to Dijkstra’s algorithm. Steiner points are added along each edge of P . On However, the Bushwhack algorithm maintains for L each Steiner point a small set of incident edges that each edge, m = O(log r ) Steiner points are placed, where L is the length of the longest edge of P and are likely to be used in order to improve the current ǫ 1 shortest path. This list of edges results in an algo- r is min( 2+3W/w , 6 ) times the minimum distance of a vertex of P to the boundary of the union of rithm that is faster than Dijkstra’s algorithm. Sun its incident faces. As before, W is the ratio be- and Reif implemented and tested their algorithm. w 1 1 tween the maximum and the minimum weight. A They found that when O( ǫ log ǫ ) Steiner points graph G is computed on the Steiner points and G are inserted per edge, the hidden constant in the mn O-notation is large. is partitioned into r sub-regions. In each sub- region, all shortest paths between pairs of vertices Aleksandrov et al. [7, 8] improve the running time n n 1 are computed. Furthermore, all shortest paths be- of the algorithm to O( √ǫ log ǫ log ǫ ) by discretiz- tween pairs of vertices on the boundaries of the ing P differently. In this algorithm, Steiner points sub-regions are computed. This computation takes are placed along the three bisectors of triangles of 2 2 O nmr r (nm) nm (nm) time. The P . The practical use of the algorithms is limited, ( log + r log √r + √r ) graph G has complexity O(nm2), which dominates since a large number of Steiner points is inserted. the space requirement of the algorithm. Note that Due to memory restrictions on current , since the graph is subdivided into small sub-graphs, this yields problems for real-life data sets. the preprocessing is suitable for parallelizing the al- If the weights used for the weighted distances are gorithm. After preprocessing, a (1 + ǫ) approxima- restricted to be in the range [1, ρ] ∪ {∞} , ρ ≥ 1, tion of the shortest path between two arbitrary query Cheng et al. [12] present an algorithm to compute an approximation of ratio (1 + ǫ) of the shortest path points on P can be reported. To our knowledge, this 2 ρ log ρ 3 ρn algorithm has not been implemented. from s to t that runs in O( ǫ2 n log ǫ ) time. The Aleksandrov et al. [6] extend this algorithm and advantage of this algorithm is that the running time place Steiner points on edges of P and in the inte- does not depend on the geometry of P . rior of faces of P . The approximation ratio remains Lanthier et al. [28] implemented the first paral-

9 lel algorithm to compute approximations of ratio is obtained [25]? Is this problem NP-hard? (1 + ǫ) for weighted shortest paths. As in previous approaches, the approach proceeds by constructing • What is the minimum number of Steiner points a graph and by computing the shortest path between needed on each face to obtain a (1 + ǫ)- vertices of a graph. The computation of the short- approximation scheme? Is this problem NP- est paths is based on Dijkstra’s algorithm and can be hard? broken down into three components: preprocessing to find a graph G, executing Dijkstra’s algorithm on G, and backtracking the path. The algorithm uses 3 Sample-Based Algorithms a spatial indexing structure called multidimensional fixed partition that achieves load balancing and re- This section reviews algorithms for computing short- duces the idle time of processors. The algorithm can est paths on discretized smooth surfaces. We focus solve the SSSP and the APSP problems. The algo- on the case where the discretization at hand is given rithm was tested on a network of workstations, on a as polyhedron. Unlike the above-mentioned algo- beowulf cluster, and on a symmetric rithms, the algorithms reviewed in this section gener- architecture. The tests were performed for six geo- alize algorithms from differential geometry to com- graphic data sets with up to one million triangles and pute geodesic paths on smooth surfaces to operate achieved acceptable running times. on discretized surfaces. The research area concerned Aleksandrov et al. [4] preprocess P in with these problems is discrete differential geometry. O n log 1 log n time and O n log 1 space, For a more extensive survey, refer to Kirsanov [24].  √ǫ ǫ ǫ   √ǫ ǫ  Kimmel and Kiryati [22] assume that a discretized such that an approximation of ratio (1 + ǫ) between surface is given in a voxel representation. That is, any point q on P and a given source point s on P 1 space is divided into a cubical grid and each grid can be computed in O ǫ time. Alternatively, P  2 point is labeled as located inside the surface, on the (g+1)n n 4 1 can be preprocessed in O 3 2 log log  ǫ / q ǫ ǫ  surface, or outside of the surface. The approach pro- 2 (g+1)n 4 1 posed by Kimmel and Kiryati has two stages. In the time and O 3 2 log space, such that an  ǫ / q ǫ  first stage, a 3D length estimator is used in a graph approximation of ratio (1 + ǫ) between any pair search on the graph defined by the surface voxels to of points on P can be computed in O(q) time, find a global approximation of the shortest path. This where g is the genus of P and where q is an input approximation is then refined using local informa- parameter. The algorithm is complex and has not tion. The refinement is done using a discrete version been implemented to our knowledge. of geodesic curvature shortening flow. This way, an The following problems related to computing approximation of a shortest path between two grid weighted shortest paths on the surface of a possibly points can be found. The approximation ratio is not non-convex polyhedron remain unsolved: shown to be bounded. However, since the underly- • No exact algorithm for computing weighted ing surface is assumed to be smooth, the approxima- shortest paths exists to our knowledge. tion is the best that can be obtained with the available voxel grid size. The algorithm has been implemented • How can m Steiner points be placed on each and tested thoroughly and appears to perform well in face such that the best approximation accuracy practice.

10 Kimmel and Sethian [23] present an approach improve an existing estimate of a geodesic path be- called fast marching method on triangular domains tween two vertices of a triangulated surface. Start- (FMM) that solves the SSSP problem by solving the ing from a path computed via FMM, the path can Eikonal equation on a triangular grid with n vertices. be refined to yield a better approximation. Simi- The result is based on Sethian’s method to solve the lar to Kimmel and Kiryati [22], a discrete geodesic Eikonal equation on a quadrilateral grid [40, 41]. curvature flow is used to iteratively improve the ap- The algorithm’s running time is O(n log n). The al- proximation. Martinez et al. show that the iterative gorithm proceeds by iteratively unfolding all of the scheme converges to the true geodesic path. triangles of the triangular mesh. When unfolding tri- Xin and Wang [46] present another iterative angles, Steiner points are placed along the edges of method to improve the path found by the fast march- the triangles. This results in shortest paths that cut ing method. The algorithm first improves the ini- through faces of the triangulation and yields consis- tial fast marching method by classifying the edges of tent results. However, the shortest paths found using P into different types and by treating different edge the FMM method only approximate the true geodesic types differently during the wave front propagation. distances on the triangular mesh. The reason is that Second, the algorithm iteratively improves the result- the true geodesic distance may require Steiner points ing shortest path until the exact locally shortest path in the interior of a triangular face. The accuracy of is found. the approach depends on the of the underly- Memoli and Sapiro [30] approximate the geodesic ing triangulation; namely on the longest edge and the distances of an underlying smooth manifold using widest angle in the triangular mesh. The algorithm a cloud of sample points without aiming to recon- requires O(n) space. Since the algorithm is easy struct a polyhedron representing the surface. The al- to implement and performs well in practice, several gorithm is based on a previous algorithm that oper- implementations of the algorithm exist. Yatziv et ates on implicit surfaces. The algorithm proceeds by al. [47] improve the running time of FMM by us- placing a ball around each sample point and by com- ing an untidy priority queue. Their experimental re- puting the union U of those balls. The Euclidean sults show that the accuracy of the computed short- distance in U is used to approximate the geodesic est paths only suffers slightly from this newly intro- distance on the underlying smooth manifold. The duced inaccuracy. Kirsanov [24] introduces a novel approximation is proven to be bounded by a constant update rule for FMM during the march. This update if the sampling rate is sufficiently small. The sam- rule yields a higher accuracy of the resulting shortest pling rate needed by the algorithm depends on the paths. Bertelli et al. [9] consider solving the APSP highest principal curvature of the underlying smooth problem using FMM. Their goal is to take advan- surface. If the sampling is subject to noise, the bound tage of the redundant computation in different passes on the approximation error gets worse. However, the of the SSSP algorithm to obtain a more efficient ap- decline in accuracy can be bounded by a function de- proach than simply running FMM n times with each pending on the sampling noise. vertex as source point. Although the algorithm is shown to achieve higher efficiency in experiments, the worst case running time of the algorithm remains O(n2 log n). Martinez et al. [29] present a way to iteratively

11 Polyhedral Cost Approximation Time Ref. Surface Metric Ratio Complexity Graph-based Convex Euclidean 1 O(n3 log n) [42] Graph-based Convex Euclidean 1 O(n2 log n) [34] Graph-based Convex Euclidean 2 O(n) [18] 1 1 1 Graph-based Convex Euclidean 1+ ǫ O(n min( ǫ1.5 , log n)+ ǫ4.5 log ǫ ) [17] 1 1 Graph-based Convex Euclidean 1+ ǫ O(n log ǫ + ǫ3 ) [2] Graph-based Convex Euclidean 1 O(n log n) [39] Graph-based Non-convex Euclidean 1 O(n5) [37] Graph-based Non-convex Euclidean 1 O(n2 log n) [32] Graph-based Non-convex Euclidean 1 O(n2) [11] 2 n 1 n Graph-based Non-convex Euclidean 1+ ǫ O n log n + ǫ log ǫ log ǫ [16] 5 5   Graph-based Non-convex Euclidean 7(1 + ǫ) O(n 3 log 3 n) [3] 8 8 Graph-based Non-convex Euclidean 15(1 + ǫ) O(n 5 log 5 n) [3] Graph-based Non-convex Euclidean 1 O(n log2 n) [21] 8 W Graph-based Non-convex Weighted 1+ ǫ O(n log(nN wǫ )) [33] Graph-based Non-convex Weighted Additive O(n5) [27] 2 2 Graph-based Non-convex Weighted ǫ O nmr r (nm) nm (nm) [5] 1+ ( log + r log √r + √r ) n 1 1 Graph-based Non-convex Weighted 1+ ǫ O( ǫ log ǫ ( √ǫ + log n)) [6] Graph-based Non-convex Weighted ǫ O n n 1 [8] 1+ ( √ǫ log ǫ log ǫ ) Graph-based Non-convex Weighted 1+ ǫ O( n log 1 + log n log 1 ) [43] ǫ2 ǫ ǫ ρ log ρ 3 ρn  Graph-based Non-convex Weighted 1+ ǫ O( ǫ2 n log ǫ ) [12] Graph-based Non-convex Weighted 1+ ǫ O n log 1 log n [4]  √ǫ ǫ ǫ  Sample-based Non-convex Euclidean Unbounded O(n log n) [23] Sample-based Non-convex Euclidean Unbounded O(n) [47]

Table 1: Results on Shortest Paths on a Polyhedral Surface P with n vertices. The constant ǫ > 0 is the desired accuracy of the shortest path. In the weighted case, N is the largest integer coordinate of any vertex W in the subdivision and w is the ratio between the maximum and the minimum weight. The symbol m ǫ 1 denotes the number of Steiner points placed along one edge. The symbol r denotes min( 2+3W/w , 6 ) times the minimum distance of a vertex of P to the boundary of the union of its incident faces. The constant ρ> 1 is the largest weight assigned to a face of P .

12 The following problems related to sample-based [3] Pankaj Agarwal and Kasturi Varadarajan. Ap- geodesic computations remain unsolved: proximating shortest paths on an nonconvex polyhedron. In IEEE Symposium on Foun- • Graph-based algorithms find globally optimal dations of , pages 182–191, paths that may not be locally optimal if the 1997. graph is based on samples obtained from a smooth surface. Algorithms from differen- [4] Lyudmil Aleksandrov, Hristo Djidjev, Hua tial geometry can be discretized to find locally Guo, Anil Maheshwari, Doron Nussbaum, and shortest paths. However, these algorithms can J¨org-R¨udiger Sack. Approximate shortest path often get trapped in local insignificant minima. queries on weighted polyhedral surfaces. Math- Can graph-based algorithms be combined with ematical Foundations of Computer Science, algorithms from discrete differential geometry 4162:98–109, 2006. to yield efficient globally convergent algorithms to compute a bounded approximation of the [5] Lyudmil Aleksandrov, Mark Lanthier, Anil geodesic distance on a sample set obtained from Maheshwari, and J¨org-R¨udiger Sack. An ǫ- a smooth surface [24]? approximation for weighted shortest paths on polyhedral surfaces. In Scandinavian Work- • Can FMM be generalized to solve the APSP shop on Algorithm Theory, pages 11–22, 1998. problem in o(n2 log n) time (recall that a solu- tion in O(n2 log n) was suggested [9])? [6] Lyudmil Aleksandrov, Anil Maheshwari, and J¨org-R¨udiger Sack. Approximation algorithms for geometric shortest path problems. In 4 Summary STOC ’00: Proceedings of the thirty-second annual ACM symposium on Theory of comput- To summarize this survey, Table 1 gives the reviewed ing, pages 286–295, 2000. results on shortest path problems on polyhedral sur- faces. [7] Lyudmil Aleksandrow, Anil Maheshwari, and J¨org-R¨udiger Sack. An improved approxima- tion algorithm for computing geometric short- References est paths. Lecture Notes in Computer Science, 2751(1):246–257, 2003. [1] Pankaj Agarwal, Sariel Har-Peled, and Meetesh Karia. Computing approximate short- [8] Lyudmil Aleksandrow, Anil Maheshwari, and est paths on convex polytopes. , J¨org-R¨udiger Sack. Determining approximate 33(2):227–242, 2002. shortest paths on weighted polyhedral surfaces. Journal of the ACM, 52(1):25–53, 2005. [2] Pankaj Agarwal, Sariel Har-Peled, Micha Sharir, and Kasturi Varadarajan. Approximat- [9] Luca Bertelli, Baris Sumengen, and B. S. Man- ing shortest paths on a convex polytope in three junath. Redundancy in all pairs fast marching . Journal of the ACM, 44(4):567– method. In IEEE International Conference on 584, 1997. Image Processing 2006 (ICIP), 2006.

13 [10] John Canny and . New lower bound [18] John Hershberger and Subhash Suri. Practical techniques for robot prob- methods for approximating shortest paths on a lems. In IEEE Conference on Foundations of convex polytope in R3. In SODA ’95: Proceed- Computer Science, pages 39–48, 1987. ings of the sixth annual ACM-SIAM symposium on Discrete algorithms, pages 447–456, 1995. [11] Jindong Chen and Yijie Han. Shortest paths on a polyhedron; Part I: computing shortest paths. [19] Takashi Kanai and Hiromasa Suzuki. Approx- International Journal of Computational Geom- imate shortest path on a polyhedral surface etry & Applications, 6(2):127–144, 1996. and its applications. Computer Aided Design, 33(11):801–811, 2001. [12] Siu-Wing Cheng, Hyeon-Suk Na, Antoine Vi- gneron, and Yajun Wang. Approximate shortest [20] Biliana Kaneva and Joseph O’Rourke. An im- paths in anisotropic regions. SIAM Journal on plementation of Chen & Han’s shortest paths Computing, 38(3):802–824, 2008. algorithm. In Proceedings of the 12th Cana- dian Conference on , [13] Edsger. W. Dijkstra. A note on two problems pages 139–146, 2000. in connexion with graphs. Numerische Mathe- matik, 1:269–271, 1959. [21] Sanjiv Kapoor. Efficient computation of geodesic shortest paths. In STOC ’99: Proceed- [14] R. M. Dudley. Metric entropy of some classes ings of the thirty-first annual ACM symposium of sets with differentiable boundaries. Journal on Theory of computing, pages 770–779, 1999. of Approximation Theory, 10:227–236, 1974. Erratum in Journal of Approximation Theory [22] Ron Kimmel and Nahum Kiryati. Finding 26:192-193, 1979. shortest paths on surfaces by fast global ap- [15] Sariel Har-Peled. Approximate shortest paths proximation and precise local refinement. In- and geodesic diameters on convex polytopes in ternational Journal of Pattern Recognition and three dimensions. Discrete and Computational Artificial Intelligence, 10(6):643–656, 1996. Geometry, 21:216–231, 1999. [23] Ron Kimmel and James Sethian. Comput- [16] Sariel Har-Peled. Constructing approxi- ing geodesic paths on manifolds. National mate shortest path maps in three dimensions. Academy of Sciences of the USA, 95:8431– SIAM Journal on Computing, 28(4):1182– 8435, 1998. 1197, 1999. [24] Danil Kirsanov. Minimal Discrete Curves And [17] Sariel Har-Peled, Micha Sharir, and Kasturi R. Surfaces. PhD thesis, Harvard University, Ap- Varadarajan. Approximating shortest paths on plied , 2001. a convex polytope in three dimensions. In SCG ’96: Proceedings of the twelfth annual sympo- [25] Mark Lanthier. Shortest path problems on poly- sium on Computational geometry, pages 329– hedral surfaces. PhD thesis, Carleton Univer- 338, 1996. sity, School of Computer Science, 1999.

14 [26] Mark Lanthier, Anil Maheshwari, and J¨org- [34] David Mount. On finding shortest paths in con- R¨udiger Sack. Approximating weighted short- vex polyhedra. Technical Report 1495, Uni- est paths on polyhedral surfaces. In Proceed- versity of Maryland, Baltimore, Department of ings of the 13th Annual ACM Symposium on Computer Science, 1985. Computational Geometry, 1997. [35] David Mount. Storing the subdivision of a [27] Mark Lanthier, Anil Maheshwari, and J¨org- polyhedral surface. In SCG ’86: Proceedings R¨udiger Sack. Approximating weighted short- of the second annual symposium on Computa- est paths on polyhedral surfaces. Algorithmica, tional geometry, pages 150–158, 1986. 30(4), 2001. [36] Joseph O’Rourke. Computational geometry [28] Mark Lanthier, Doron Nussbaum, and J¨org- column 35. SIGACT News, 30(2):31–32, 1999. R¨udiger Sack. Parallel implementation of geo- metric shortest path algorithms. Parallel Com- [37] Joseph O’Rourke, Subhash Suri, and Heather puting, Elsevier, 29, 2003. Booth. Shortest paths on polyhedral surfaces. In Symposium on Theoretical Aspects in Com- [29] Dimas Martinez, Luiz Velho, and Paulo Cezar puter Science, 1985. Carvalho. Geodesic paths on triangular meshes. SIBGRAPI: Brazilian Symposium [38] Yevgeny Schreiber. Shortest paths on realis- on and Image Processing, tic polyhedra. In SCG ’07: Proceedings of the 00:210–217, 2004. twenty-third annual symposium on Computa- tional geometry, pages 74–83, 2007. [30] Facundo Memoli and Guillermo Sapiro. Dis- tance functions and geodesics on point clouds. [39] Yevgeny Schreiber and Micha Sharir. An Technical Report 1902, University of Min- optimal-time algorithm for shortest paths on nesota, Institute of Mathematics and its Appli- a convex polytope in three dimensions. Dis- cations, 2002. crete and Computational Geometry, 39:500– 579, 2008. [31] Joseph Mitchell. Geometric shortest paths and network optimizations. In: J¨org-R¨udiger [40] James Sethian. A fast marching level set Sack and Jorge Urrutia (Editors). The hand- method for monotonically advancing fronts. book of computational geometry. Chapter 15, Proceedings of the National Academy of Sci- pages 633–701. Elsevier Science, 2000. ences, 93(4):1591–1595, 1996. [32] Joseph Mitchell, David Mount, and Christoph [41] James A. Sethian. Level Set Methods and Papadimitriou. The discrete geodesic prob- Fast Marching Methods: Evolving Interfaces lem. SIAM Journal on Computing, 16:647– in Computational Geometry, Fluid , 668, 1987. , and . Cam- bridge University Press, 1999. [33] Joseph Mitchell and Christos Papadimitriou. The weighted region problem: finding shortest [42] Micha Sharir and Amir Schorr. On shortest paths through a weighted planar subdivision. paths in polyhedral spaces. SIAM Journal on Journal of the ACM, 38(1):18–73, 1991. Computing, 15:193–215, 1986.

15 [43] Zheng Sun and John H. Reif. On finding ap- proximate optimal paths in weighted regions. Journal of Algorithms, 58(1):1–32, 2006.

[44] Vitaly Surazhsky, Tatiana Surazhsky, Danil Kirsanov, Steven J. Gortler, and Hugues Hoppe. Fast exact and approximate geodesics on meshes. ACM Trans. Graph., 24(3):553– 560, 2005.

[45] Mikkel Thorup. Undirected single-source shortest paths with positive integer weights in linear time. Journal of the ACM, 46(3):362– 394, 1999.

[46] Shi-Qing Xin and Guo-Jin Wang. Efficiently determining a locally exact shortest path on polyhedral surfaces. Computer Aided Design, 39(12):1081–1090, 2007.

[47] Liron Yatziv, Alberto Bartesaghi, and Guillermo Sapiro. O(n) implementation of the fast marching algorithm. Journal of Computational , 212(2):393–399, 2006.

16