Expert Systems With Applications 45 (2016) 286–293
Contents lists available at ScienceDirect
Expert Systems With Applications journal homepage: www.elsevier.com/locate/eswa
A linear time algorithm for minimum conic link path in a simple polygon Shuo-Yan Chou a, Chang-Chien Chou b,∗ a b
Department of Industrial Management, National Taiwan University of Science and Technology, Taiwan ROC Department of Information Management, Lunghwa University of Science and Technology, Taiwan ROC
a r t i c l e
i n f o
Keywords: Path planning Conic link path Conic visibility Circular visibility Splinegon Computational geometry
a b s t r a c t We consider the problem of finding, in a simple polygon, from a starting point to a destination point, a piecewise path consisting of conic sections. By considering only one type of conic section, i.e., circular, elliptic, hyperbolic, or parabolic curves, we present an O(n) time algorithm for computing the path with the minimum number of conic sections. The studied problem is the generalization of the straight line link path version. The results can be conducted in versatile applications: the hidden surface removal problem in CAD/CAM, the contour tracing, the red-blue intersection problem, the robot motion planning, and related computational geometry applications. The linear time property is most vital for those applications need to take instant reaction. © 2015 Elsevier Ltd. All rights reserved.
1. Introduction The lion and man problem is one famous game concerning the visibility search problem. A lion tries to capture a man who is escaping in a circular arena. The players have equal speeds. They can observe each other all the time. Noori and Isler (2014) studied a variant of the game in which the lion has only line-of-sight visibility in a polygonal area. That is, it can observe the man’s position only if the line segment connecting them does not intersect the boundary of the polygon. They showed that a single deterministic pursuer with lineof-sight visibility constraint can capture an evader whose speed is equal to the pursuer’s in any monotone polygon. The visibility problem has been widely studied in the fields of computational geometry (Alsuwaiyel & Lee, 1993, 1995; Chandru, Ghosh, Maheshwari, Rajan, & Saluja, 1995; Li & Klette, 2008). Until Suri proposed a linear time algorithm in 1986, the visibility problem of the straight line segment in a simple polygon had been treated thoroughly. Suri’s method begins with the triangulation of the simple polygon. A tree structure is constructed after the triangulation which can be regarded as the dual graph of the triangulated simple polygon. A dominant property in the tree structure is that: among every paired vertices (from top to leaf), there exists only one unique path. This property reigned the dominance in Suri’s linear time algorithm. Maheshwari and Sack (1999) proposed an optimal algorithm for computing the minimum rectilinear link path in a rectilinear polygon. Despite of the simple polygon, when there were holes in the polygon, ∗
Corresponding author. Tel.: +886 2 8209 3211. E-mail addresses:
[email protected] (S.-Y. Chou), samuelchou7@yahoo. com.tw (C.-C. Chou). http://dx.doi.org/10.1016/j.eswa.2015.09.034 0957-4174/© 2015 Elsevier Ltd. All rights reserved.
Mitchell, Rote, and Woeginger (1992) proposed an improved method. Fig. 1 is the example where obstacles appear between the starting and the destination points in a polygon. Mitchell’s method is basically incrementally computing the visible region of the line segment. The algorithm can construct the minimum link path with its length in O(Eα (n)log2 n) by using O(E) data structure where n is the number of edges of the obstacles, E is the size of the visibility graph, α (n) is a slow increasing function which is the inversion of the Ackermann function. Furthermore, Fekete, Mitchell, and Schmidt (2012) adopt the visibility problem of line segments into the myopic watchman problem with discrete vision (MWPDV) as shown in Fig. 2. The myopic watchman needs to walk along a rectilinear area and returns back to the starting point. On the routing, (i) all the points in the polygon must been seen and (ii) the sum of the tour length and the weighted number of monitors must be the minimum. They points out that MWPDV is NP-hard. Mitchell, Polishchuk, and Sysikaski (2014) studied a lot about the link paths problems. Recently, Klein and Suri (2015) investigate the lion-and-man problem in the visibility-based discrete-time model of pursuit evasion in the plane: how many pursuers are needed to capture an evader in a polygonal environment with obstacles under the minimalist assumption that pursuers and the evader have the same maximum speed? √ They proved a tight bound of n when the environment is a simple polygon with n vertices. Yang et al. (2014) present an algorithm to compute the weak visibility polygons (WVP) of NonUniform Rational B-spline (NURBS) curves inside simple polygons. In that paper (Yang et al., 2014), the NURBS curve is first subdivided into triangular curves. They then compute the WVP of each triangular curve by shearing that of its
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293
287
s d
d
s
Fig. 3. Illustration of MLLP and MCLP in a simple polygon.
Fig. 1. A polygon with obstacles, there are at least 3 links from s to d.
(a)
(b) Fig. 2. (a) One solution of MWPDV with minimum monitor; (b) solution of MWPDV with shortest path.
triangle hull. Finally, all triangular curves’ WVPs are merged together to obtain the WVP of the NURBS curve. Yang’s paper is to compute the WVPs of one given NURBS curve segment. This is not to compute the NURBS curve form a given point to a destination point in a polygon like our work did. It essentially is also straight line visibility emanating from points on an NURBS curve segment. However, only Yang’s paper has better correspondence to our work rather than the other papers mentioned above. All literatures are mostly discussing about straight line visibility. There is no literature discussing the studied problem proposed by this paper so far. Since straight lines are degenerate conic sections, once the solutions are obtained in conical version, the applications are essentially broaden against the linear version. The algorithm proposed in this paper is the generalization of the linear link path problem (Suri, 1986). There are many physical phenomena that can be characterized by conic sections: the parabolic trajectories of objects under gravity and particles traveling in the electric and magnetic fields. A segment of a conic section is called a link. The problem studied in this paper is to compute a conic link path (CLP) with the minimum number of links from a starting point to a destination point in a simple polygon. The conic link paths consist of one of the four types of conic sections: circular, elliptic, hyperbolic, or parabolic curves. The traces of conics can be considered as trajectories of visibility and had been used to establish conic visibility for years. Among the conic visibility problems, the most-studied one is the circular visibility problem which was introduced by Agarwal and Sharir (1993). In their
paper (Agarwal & Sharir, 1993), the time to compute the circular visibility polygon (CVP) can be achieved in O(nlog n) time and the first intersection from a point to an edge of the simple polygon can be carried out in O(log n) time after an O(nlog n) preprocessing. Chou and Woo (1995) improved the above result by developing a linear time algorithm to compute the CVP from a point inside a simple polygon. García-López and Ramos (2000) further proposed a unified approach to compute the CVP comprising all four types of conic curves inside a simple polygon. They took advantage of inversion to transform one conic visibility problem to one corresponding visibility problem of straight lines emanating from ∞ to a splinegon (to be defined later). As the corresponding inversed linear visibility problem can be solved in linear time, the original CVP problem can be solved optimally in linear time accordingly. The linear link path (LLP) in a simple polygon refers to the set of piecewise line segments connecting from the starting point to the destination point. The LLP with the minimum number of line segments is called the minimum linear link path (MLLP). In this work, the link path problem is extended by considering conic segments and thus defining the problem of finding the minimum conic link path (MCLP) in a simple polygon. Since straight lines are degenerate conics, LLPs are therefore degenerate CLPs. Due to the enhanced reach-ability resulting from conics, the number of the links of MCLP is in general less than or equal to that of MLLP. Fig. 3 depicts the case of a simple polygon for which MLLP contains two links whereas MCLP contains only one link. We have Lemma 1. Lemma 1. The number of links in MCLP presented by #Links(MCLP) is less than or equal to the number of links in MLLP in the identical polygon with the same starting and destination points, i.e.,
#Links(MCLP ) ≤ #Links(MLLP ). This paper utilizes the approaches developed by García-López and Ramos (2000) as an internal loop computing engine and then develops a linear time algorithm for computing the MCLP in a simple polygon. Since conic sections own the ability to “make a turn”, the results from this paper can be conducted in a variety of applications: such as, the hidden surface removal (Halperin & Overmars, 1998; Sando, Barada, & Yatagai, 2013), the contour tracing (Liu, Tang, Yi, & He, 2013), the conic version of red-blue intersection (Agarwal & Sharir, 1990), and the robot motion planning (Boissonnat, Ghosh, Kavitha, & Lazard, 2002; Wang & Cao, 2014). The rest of this paper is organized as follows. Section 2 describes the fundamentals of this work. Section 3 gives the algorithms and the proofs of their correctness and optimality along with an example. Section 4 concludes this paper and points out some potential applications and the future works. 2. Preliminaries Let P denote the given polygon and conic(i, j) denotes the conic segments connecting two points i and j. For any point x∈P, the CVP from x, denoted by Vc (x), is the sets of points in P visible from x, i.e.,
VC (x) = {z ∈ P |conic(x, z) ∩ P = conic(x, z)}.
288
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293
Fig. 4. Two equivalent visibility polygon problems.
Similarly, for a conic segment or an edge e in P, the weak CVP of e, denoted by VC (e), is the sets of points in P visible from at least one point on e, i.e.,
VC (e) = {z ∈ P |∃y ∈ e s.t. conic(y, z) ∩ P = conic(y, z)}. In order to establish MCLP, one needs to compute the CVP from the starting point s, i.e., VC (s), as well as from a bounding conic segment of the current CVP, i.e., VC (e). With the approaches provided by García-López and Ramos (2000), both VC (s) and VC (e) can be computed in linear time. This is achieved by transforming the problem of computing CVP from a point to a corresponding problem of computing the linear visibility polygon from ∞ to a splinegon by inversion. The splinegon was introduced by Dobkin and Souvaine (1990): a curved polygon is called a splinegon if each curved edge is contained in the boundary of its convex hull. The linear visibility polygon computed with respect to the splinegon can be inverted back to the original domain to result in the corresponding CVP. Jakob Steiner used to systematically investigated inversion (Courant & Robbins, 1996), the inverse of the point (x, y) relative to the inversion circle with inversion center (x0 , y0 ) and inversion radius k is given by
x = x0 +
k2 (x − x0 )
(x − x0 ) + (y − y0 ) 2
2
,
and
y = y0 +
k2 (y − y0 )
(x − x0 )2 + (y − y0 )
. 2
In the case of the circular visibility problem, the point on the circular arc can thus be mapped to its corresponding inverse point by the following transformation which carries the inversion center coincide with the origin and letting the length of the inversion radius k be one,
(x, y) → (x, y) =
(x, y) . x 2 + y2
The above transformation maps the circle x2 + y2 = 2xox + 2byoy (centered at (xo , yo ) and passing through the inversion center, the origin) to the line 2xox + 2yoy − 1 = 0. Circular conics emanating from a point are inversed to straight lines emanating from ∞. In this manner, one can carry out the computation of circular visibility polygon with an equivalent inversed problem. While point p in Fig. 4(a) is used as the inversion center and mapped to ∞ in Fig. 4(b), the straight line polygon in Fig. 4(a) is mapped to the splinegon in Fig. 4(b). Note that the interior of the polygon is mapped to the exterior of the splinegon. Consequently, the three shaded areas in Fig. 4(b) which are not linearly visible form ∞, correspond to the three shaded areas which are not visible from point p in Fig. 4(a). With the same technique, García-López and Ramos (2000) marshaled the other three types of conic section inversions. If one is computing the elliptic visibility problem, the following transformation provides the inverse function which transforms the elliptic visibility problem to an equivalent linear visibility problem for straight lines emanating from ∞ to a splinegon,
(x, y) → (x, y) =
(x, y) (b > 0). x2 + by2
Fig. 5. Illustration of windows and the circular visibility polygon from p.
This transformation maps the ellipse x2 + by2 = 2xox + 2byoy to the line 2xox + 2byoy − 1 = 0. Similarly, with respect to the hyperbolic visibility problem, the transformation
(x, y) → (x, y) =
(x, y) ( b < 0) x2 + by2
maps hyperbola x2 + by2 = 2xox + 2byoy to line 2xox + 2byoy − 1 = 0. And finally, for the parabolic visibility problem, the transformation
(x, y) → (x, y) =
(x, y) x2
inverses parabola y = ax2 + bx to the line y = bx + a. According to the work of García-López and Ramos (2000), we can sum up the above four types of conic sections inversions by Theorem 1. Theorem 1. The CVP from a point or an edge in a simple polygon has deterministic algorithm to inverse it to a corresponding visibility problem from ∞ to a splinegon, i.e., (VC (s)|VC (e)) →Vstraight line (∞) to a splinegon. Once the corresponding visibility problem from ∞ to a splinegon is obtained, García-López and Ramos (2000) proposed a unified approach to compute its visibility polygon. Since inversion is involutive, i.e., ((x, y) ) = (x, y), we can first solve the more intuitive inversed visibility problem with straight lines from ∞ to a splinegon, and then inversed back the resulting visibility polygon to obtain original CVP in question. The three sets of shaded regions shown in Fig. 4(a) and (b) have exact inversion correspondence. Since VC (s) is computed only once in the beginning, we will only discuss the case of VC (e). Let the boundary of P be represented as ∂ P and the boundary of VC (e) be represented as ∂ VC (e). Computing VC (e) results in a division of P, consisting of VC (e) and a set of k sub polygons ki=1 Pi = {P1 , . . . , Pk } of P. These conic invisible regions of e are separated from VC (e) by individual conic segments, which are parts of ∂ VC (e), namely the windows, represented by W. W can therefore be defined as follows. Definition 1. W indows,W = {W1 , . . . , Wk } ≡ ∂ VC (e) − (∂ VC (e) ∩ ∂ P ).
Fig. 5 illustrates the case of circular conics where arcs p1 p2 , p3 p4 , p5 p6
are windows of VC (p), and three shaded regions are the three and invisible regions Pi with respect to P. In this paper, in each iteration, a specific window is picked up as the source to further exploring the invisible regions. Normally, more than one window will be generated with respect to a source. To identify the specific window from the set W, the polygon P is triangulated at first. Since P is a simple polygon, the triangles in the path from the source to the destination form a chain, and are indexed in an ascending order, as shown in Fig. 6. The chain can be easily established as follows. Let T be the triangulation, G be the dual graph of T. G is obtained by assigning a vertex labeled as ti to each face of T, and connecting two vertices ti and tj if and only if the two triangles ti and tj in
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293
l
(Sufficiency) when p ∈ Wf , either q ∈ (CV P − W f ) or q ∈ ki=1 Pi . If q ∈ (CV P − W f ) then the next CLP resulting from q must pass through some point of Wf , say point p. If q ∈ ki=1 Pi , due to the characteristics of simple polygon, the next and (or) remaining CLPs from q must return back to the current CVP and then similarly pass through some point of Wf , again say point p. Hence, #Links(CLP ( p)) ≤ #Links(CLP (q)). Once Lemma 2 is obtained, the problem of computing VC (x) and VC (e) can be reduced to simply computing VC (Wf ). Of course, the first calculation of CVP is still to compute the CVP from a point, i.e., the starting point s, VC (s). Let ζ be the conic in which Wf is deriving from and thus
h
k g j
i
f 9
10 11 19
17 14 16
21
6
12
18
20
7
8
5
13 a
15
e
22
b c
d
4 3
s
2 1
Fig. 6. An example of chain and ti - chainincident triangles.
T share a common side. Thus, the graph G generated in this way is a tree, with a maximum degree of three on each node. Since G is a tree, the path in G from ts to td is unique. Let the nodes in the path of ts to td be indexed in ascending order according to their appearance along the path. Those ti (from ts to td ) are passed by Suri’s MLLP. Then the chain is constructed in an ordered list of nodes
{ts = 1, 2, . . . , l − 1, l = td }. d
Definition 2. chain ≡ {
i=s ti |ti
∩ MLLP = MLLP }.
The chain formed in this manner indicates a forward direction of visioning from s to d in P. The data structure chain will progress our algorithm for computing MCLP in this direction incrementally. The window that separates the CVP and the invisible region containing the chain, denoted by Wf , is the specific window leading to the destination. Observing that only one window appearing in the chain intersects the highest indexed triangle in CVP. This property helps us distinguishing the specific Wf from a plural number of windows. Through Wf we will show that MCLP is contributed by adding the successive Wf s and (or) their extensions. As those triangles not encompassed by the chain, but through triangle ti having correspondence with the chain, are denoted as ti -chainincident triangles. For example, in Fig. 6, ta , tb , tc , and te are t4 -chainincident triangles; tf , tg , and th are t7 chainincident triangles; and ti , tj , tk , and tl are t10 -chainincident triangles. Definition 3. ti − chainincident ≡ { ki= j ti |ti ∩ chain = e ∈ ∂ Pchain , / ∂ Pchain }, where ∂ Pchain denotes the boundary of P ti ∩ ti+1 = e ∈ formed by chain. 3. Algorithm Once chain is obtained and CVP is computed, Wf is determined accordingly. Let p and q be two distinct points in P, #Links(CLP(p)) and #Links(CLP(q)) be the number of links of CLP emanating from p and q respectively. Lemma 2 implies that Wf stands on the place exploring MCLP. Lemma 2. p ∈ Wf .
289
∀ p, q ∈ P, q ∈/ W f , #Links(CLP( p)) ≤ #Links(CLP(q))iff
Proof. (Necessity) Since q∈Wf , either q ∈ (CV P − W f ) or q ∈ ki=1 Pi . p can belong to CV P − W f , ki=1 Pi , or Wf . In the cases of p ∈ (CV P − W f ) k and p ∈ i=1 Pi , #Links(CLP(p)) may be greater than #Links(CLP(q)). In the case of p ∈ Wf , all CLPs emanating from q in the regions of CV P − W f or ki=1 Pi must pass through some points in Wf , say p, i.e. #Links(CLP ( p)) ≤ #Links(CLP (q)). Hence, p ∈ Wf .
ζ ∩ CV P = ζ , Corollary 1 further illustrates that MCLP can be achieved by adding successive ζ s into MCLP. Corollary 1. Wf ∈ ζ ∈ MCLP. Proof. By definition, Wf ∈ ζ . By Lemma 2, Wf is as the source to further explore MCLP. Hence, by adding conic ζ in which Wf is deriving from to the set of CLP will not increase the #Links(CLP), we get ζ ∈ MCLP. Thus, by adding successive ζ s to the set of CLP is sufficient to result in MCLP. In addition, remove the current CVP and its ti -chainincident triangles can further simplify the computation for the next CVP. Lemma 3. Remove the current CVP except Wf and those ti -chainincident triangles to the current CVP is sufficient to compute the next CVP. Proof. As been shown that Wf divides P into CVP and the conic invisible regions ki=1 Pi , those indexed triangles with larger indexes than that of the highest ti intersected by Wf implies that they are in the future CVP so that they should be reserved. On the other hand, those indexed triangles in CVP refer to had been seen. Hence, by Lemma 2, remove them is sufficient to compute the next CVP. With respect to those triangles which are not in the chain but have ti -chainincident correspondence to the current CVP, by Lemma 2, any conic emanated from therein cannot generate smaller #Links(CLP) than Wf does. It is sufficient to remove them to compute the next CVP. Besides, once several ti -chainincident triangles as well as the triangles in current CVP are removed, the number of vertexes of a new P reduces accordingly. Algorithm 1. Constructing_Chain (P, s, d, chain) Input: A simple polygon P with a starting point s and a destination point d. Output: chain, a set of triangles with a tree data structure (dual graph of P). Step 1: Let G be the triangulation of P by using Chazelle (1991). Step 2: Number the triangles from s as ti in ascending order, s.t. / P )); P = ti − ((e ∈ ti )&(e ∈ Step 3: Connect ti and t j iff ti and t j shares the same side. This is to build up a tree T which is the dual graph of G. Every node in T has a maximum degree of three branches; Step 4: Since T is a tree structure, the route from root s to one leaf d is unique. Therefore, it can be represented by an ordered list of nodes {ts =1, 2, …, l−1, l = td }; Step 5: By using Suri’s algorithm (1986), the MLLP can be obtained. Step 6: chain (Definition 2) is built in this fashion that implies a forward direction of visioning from s to d in P. The main algorithm is also built in this incrementally forwarding way to obtain MCLP; Step 7: Stop;
Chazelle’s algorithm (1991) is based on a deterministic algorithm that computes the visibility map structure. The map structure is a generalization of a trapezoidation. Athough Chazelle’s triangulation is a very complex algorithm, the whole time complexity is theoretically linear. Since Step 1 uses Chazelle’s linear time algorithm, Suri’s algorithm in Step 5 is linear time, too, the whole algorithm Constructing_Chain has also linear time complexity.
290
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293
10 11 19
18 17 14
20 16
21 22
d
15
9
12 13
8
7 6 5 4 3
s 1
2
Fig. 7. An example of the results of Algorithm 2 with #Links(MCLP(s)) = 3.
The proposed algorithm is incrementally computing CVPs to generate successive Wf s (and ζ s) which together contribute MCLP. The algorithm starts from a triangulation of P. By using the dual graph of this triangulation, the chain accompanied the indexed ti and the relationships of ti -chainincident are obtained. We then start the loops incrementally computing CVP. Each time CVP is obtained, Wf is determined. By extracting Wf ’s extension ζ , we can add the conic ζ to the set of CLP. We then remove the current CVP and those ti -chainincident triangles except Wf to reduce the number of vertices. We stand on Wf to start over the same processes of computing the next CVP until that d ∈ CVP is achieved. The completed CLP will eventually result in MCLP. The overall processes can be written by following Algorithm 2. The procedure for computing CVP uses the algorithm of García-López and Ramos (2000) herein we write as VC (). After performed the algorithm, Fig. 7 shows a circular case of three conic links and six linear links, both of them are the minimum. Algorithm 2. Minimum_Conic_Link_Path (P, s, d, MCLP) Input: A simple polygon P with a starting point s and a destination point d; Output: The Minimum Conic Link Path MCLP; Step 1. Call Algorithm 1. Constructing_Chain (P, s, d, chain); //Compute the chain by using the dual graph of the triangulation of P. Step 2. In the chain, from s to d index ti in ascending order; Step 3. Let j = 1; Step 4. If j = 1 then Compute VC (s) //CVP from a point else Compute VC (W f ( j)); //weak CVP from an edge Step 5. Produce windows, W += ∂ ζ ; Step 6. Choose W f ( j) from W which intersects the highest indexed ti ; Step 7. Remove current CVP except W f ( j) and those ti -chainincident triangles for the current CVP to reconstruct a new P with less triangles and possesses W f ( j) as one of its edge; Step 8. Add the conic ζ from W f ( j)’s extension to the set of CLP; Step 9. j++; Step 10. Repeat Steps 4 through 10 until d ∈ W f ( j); Step 11. Output MCLP ← CLP; Step 12. Stop;
Theorem 2. Algorithm Minimum_Conic_Link_Path has O(n) time complexity to compute MCLP in a simple polygon. Proof. We first prove the correctness of the algorithm and then discuss its time complexity. The correctness of the proposed algorithm can be easily established by presenting a series of lemmas and corollary as follows. In each iteration of computing CVP from Step 4 through Step 10, by Lemma 2, the algorithm makes Wf as the source to further explore next CVP. By Corollary 1, the conic ζ about which Wf is derived can be added to the set of MCLP. By Lemma 3, remove the current CVP except Wf and those ti -chainincident triangles for the current CVP is sufficient to compute the next CVP. All of these properties hold in each loop while computing CVP. Hence, algorithm Minimum_Conic_Link_Path is sufficient to result in MCLP.
s d
Fig. 8. Input instance P with a staring point s and a destination d.
With respect to its time complexity, Step 1 uses Chazelle’s triangulation (1991) which can be achieved in linear time. Its dual graph G can be obtained in linear time, the indexed triangles which formed the chain can also be achieves in linear time, too. Thus, time consumed in Steps 1−3 is of O(n) where n refers to the number of vertexes of the simple polygon P. Step 4 uses García-López and Ramos’s (2000) linear time algorithm. Steps 5−9 are less than O(n). The major time consumed in this algorithm is the number of loops. Suppose the number of loops of Steps 4−10 is m, observing that each time m increases by 1, several triangles are removed in Step 7, i.e., the number of n decreases as the number of m increases. According to the behavior of amortization (Goodrich & Tamassia 2002), time consuming in the loops can be represented by
O(n1 ) + O(n2 ) + . . . + O(nm ) = O(n), where n1 + n2 + . . . + nm = n Time complexity of the whole algorithm is of O(n). Below Figs 8−11 give us an example about circular section version on how the proposed Minimum_Circular_Link_Path algorithm makes the MCLP. Fig. 8 is the initial input state of a simple polygon P. We are now constructing the MCLP from s to d. Fig. 9 is at first calling algorithm Constructing_Chain to do Chazelle’s triangulation and then obtaining chain. Followed by applying Suri (1986)’s algorithm, MLLP denoted by the dash line can be obtained. By this manner, the structure of chain is built. Fig. 10 takes the advantage of chainincident property to eliminate certain triangles. This is to reduce the number of n. Fig. 11 takes García-López and Ramos (2000)’s linear time algorithm to produce CVP and Wf . The shaded regions are invisible from current CVP. Fig. 12 remove the t11 -chainincident triangles, the current CVP and then compute the next CVP from the window Wf . The process is repeated until the obtained CVP contains d. Eventually, we can pop up the CLPs back from d to s, in this case that will be the extensions of Wf (5), Wf (4), Wf (3), Wf (2), and Wf (1) as shown in Fig. 13.
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293
44
27 28
26
29
34
43 45
37
36
35
42
41
33
38
291
32
27
25
31
30
28
26
25
24
23
22
20
21 19
24 39 46
19 40
21
18 47
23
20
29
22
49
48
14
50
30
10 11
12 15
16
32 1
d
2
4
4 3
3
Fig. 11. Compute CVP from point s.
Fig. 9. Triangulation of P.
27
27 28
26
25
24
23
22
28
20
21
26
25
24
23
22
20
21 19
19 29
14
29
18
15 16
13
11
9
8
11
5
5
s d
1 2
4 3
Fig. 10. Chain is built, renewing ti .
7
32
32
2
8
6
6
1
9
10
31
7
s
17
12
12 10
18
15 16
13
17
31
d
14
30
30
5
s
5
1 2
7 6
6
s
8
31
51
d
9
10
11
7
17
12
9
8
18
15 16
13
17 13
14
4 3
Fig. 12. Remove the t8 -chainincident triangles, t11 -chainincident triangles, and the current CVP. Compute the next CVP.
292
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293
27 28
26
25
24
23
22
This type of finding the shortest distance between conic sections has many applications, such as: in silicon wire design (Zhang, Wang, Liu, & Shen, 2014), in optic engineering (Canavesi, Cassarly, & Rolland, 2013), in robot motion planning (De Berg & Gerrits, 2013), in architectural design (Yang et al., 2014), and in the computation of the visibility of silhouettes (Nowrouzezahrai, Baran, Mitchell, & Jarosz, 2014). In addition, based on the linear time advantage provided by the proposed algorithms, the implementation for the Expert and Intelligent Systems may find significant benefits especially for those systems that need to take instant reaction. And of course, traditional applications in the degenerate version about straight line link path can now evolve toward their generalized applications in the conic world.
20
21 19
29
14
16
13 30
18
15
17
4.3. Future works 12 11
9
10
7
For the future works, it is interesting to us, based on the produced MCLP, find at least one actual CLP that constructs MCLP. In addition, what is the Euclidean shortest conic link path? Are they unique? Or despite of MCLP, what is the shortest conic link path? Once the polygon has holes, how did the algorithms react? They are all still essentially open problems.
5
Acknowledgment
8
31 6 32 s 1
d
2
4 3
Fig. 13. The output, #Links(MCLP(s)) = 5, #Links(MLLP(s)) = 9.
4. Conclusion The proposed algorithms are simple after applying the techniques of inversion and windows. However, it can solve for a given simple polygon, the conic link path containing the minimum number of conic links from a starting point to a destination point in linear time. Since Suri (1986) had already developed the linear time algorithm of the straight line version, its generalized conic linear time version algorithm proposed in this paper has inherently broadened applications. 4.1. Discussions Among the four types of conic sections, we guess that the circular and elliptic curves have better effects, i.e., less #Links(MCLP) than those of the parabolic and hyperbolic curves in the identical simple polygon. Because circle and ellipse have better flexible curvature bringing better reach-ability rather than parabola and hyperbola have. Hyperbola perhaps owns the worst #Links(MCLP) since it has the highest linearity against the other three conics. Hyperbola needs more links to achieve the destination than the other three conics under the same circumstance. The results from this paper have some advantages and limitations. The strength is its calculation time complexity. The weakness is that it lacks the empirical results although this is one of our future works to facilitate the proposed algorithms. The opportunity is that some potential applications may find merits from this paper especially for those intelligent systems needing speed to take prompt reactions. 4.2. Implications Conic optimization is one type of convex optimization (Skajaa & Ye, 2015; Ben-Tal & Hertog, 2014; Deng, Fang, Jin, & Lu, 2015), that is usually to find the shortest pair of points in two conic sections.
This work was supported by the Ministry of Science and Technology, Taiwan, ROC, under the Grant MOST 103-2221-E-262 -014. This work was also supported in part by the research fund of Hanyang University (HY-2014year). References Agarwal, P. K., & Sharir, M. (1990). Red-blue intersections algorithm with applications to motion planning and collision detection. SIAM Journal on Computing, 19, 297– 322. Agarwal, P. K., & Sharir, M. (1993). Circular visibility of a simple polygon from a fixed point. International Journal of Computational Geometry & Applications, 3, 1–25. Alsuwaiyel, M. H., & Lee, D. T. (1993). Minimal link visibility paths inside a simple polygon. Computational Geometry Theory and Applications, 3(1), 1–25. Alsuwaiyel, M. H., & Lee, D. T. (1995). Finding an approximate minimum-link visibility path inside a simple polygon. Information Processing Letters, 55(2), 75–79. Ben-Tal, A., & Hertog, D. (2014). Hidden conic quadratic representation of some nonconvex quadratic optimization problems. Mathematical Programming, 143(1–2), 1– 29. Boissonnat, J.-D., Ghosh, S. K., Kavitha, T., & Lazard, S. (2002). An algorithm for computing a convex and simple path of bounded curvature in a simple polygon. Algorithmica, 34, 109–156. Canavesi, C., Cassarly, W. J., & Rolland, J. P. (2013). Supporting conic design methods and conic intersection properties. Optical Engineering, 53(3). Chandru, V., Ghosh, S. K., Maheshwari, A., Rajan, V. T., & Saluja, S. (1995). NC-Algorithms for minimum link path and related problems. Journal of Algorithms, 19, 173–203. Chazelle, B. (1991). Triangulating a simple polygon in linear time. Discrete and Computational Geometry, 6, 485–524. Chou, S. Y., & Woo, T. C. (1995). A linear-time algorithm for constructing a circular visibility diagram. Algorithmica, 14, 203–228. Courant, R., & Robbins, H. (1996). Geometrical transformations. Inversion. What is mathematics?: An elementary approach to ideas and methods (2nd ed., pp. 140– 146). Oxford, England: Oxford University Press. De Berg, M., & Gerrits, D. H. P. (2013). Computing push plans for disk-shaped robots. International Journal of Computational Geometry & Applications, 23(1), 29–48. Deng, Z., Fang, S.-C., Jin, Q., & Lu, C. (2015). Conic approximation to nonconvex quadratic programming with convex quadratic constraints. Journal of Global Optimization, 61(3), 459–478. Dobkin, D. P., & Souvaine, D. L. (1990). Computational geometry in a curved world. Algorithmica, 5, 421–457. Fekete, S. P., Mitchell, J. S. B., & Schmidt, C. (2012). Minimum covering with travel cost. Journal of Combinatorial Optimization, 24, 32–51. García-López, J., & Ramos, P. A. (2000). A unified approach to conic visibility. Algorithmica, 28, 307–322. Goodrich, M. T., & Tamassia, R. (2002). Amortization. Algorithm design: Fundations, analysis, and internet examples (pp. 34–41). John Wiley & Sons. Halperin, D., & Overmars, M. H. (1998). Spheres, molecules, and hidden surface removal. Computational Geometry, 11(2), 83–102. Klein, K., & Suri, S. (2015). Capture bounds for visibility-based pursuit evasion. Computational Geometry, 48, 205–220. Li, F., & Klette, R. (2008). An approximate algorithm for solving the watchman route problem. Chapter published in Lecture Notes in Computer Science. pp. 189–206
S.-Y. Chou, C.-C. Chou / Expert Systems With Applications 45 (2016) 286–293 Liu, Q. L., Tang, L. X., Yi, F., & He, L. S. (2013). A new reptile method for contour tracing based on an extended freeman code and an alterable window. Applied Mechanics and Materials, 325–326, 1539–1542. Maheshwari, A., & Sack, J.-R. (1999). Simple optimal algorithms for rectilinear link path and polygon separation problems. Parallel Processing Letters, 9(1), 31– 42. Mitchell, J. S. B., Rote, G., & Woeginger, G. (1992). Minimum-link paths among obstacles in the plane. Algorithmica, 8, 431–459. Mitchell, J. S. B., Polishchuk, V., & Sysikaski, M. (2014). Minimum-link paths revisited. Computational Geometry, 47(6), 651–667. Noori, N., & Isler, V. (2014). Lion and man with visibility in monotone polygons. The International Journal of Robotics Research, 33(1), 155–181. Nowrouzezahrai, D., Baran, I., Mitchell, K., & Jarosz, W. (2014). Visibility silhouettes for semi-analytic spherical integration. Computer Graphics Forum, 33(1), 105– 117.
293
Sando, Y., Barada, D., & Yatagai, T. (2013). Hidden surface removal of computergenerated holograms for arbitrary diffraction directions. Applied Optics, 52(20), 4871. Skajaa, A., & Ye, Y. (2015). A homogeneous interior-point algorithm for nonsymmetric convex conic optimization. Mathematical Programming, 150(2), 391–422. Suri, S. (1986). A linear time algorithm for minimum link paths inside a simple polygon. Computer Vision, Graphics, and Image Processing, 35, 99–110. Wang, Y., & Cao, W. (2014). A global path planning method for mobile robot based on a three-dimensional-like map. Robotica, 32(4), 611–624. Yang, C.-L., Wang, W.-Z., Yang, Y.-J., Lu, L., Zhu, Z.-J., Zhu, B., & Zeng, W. (2014). Weak visibility polygons of NURBS curves inside simple polygons. Journal of Computational and Applied Mathematics, 256, 1–15. Zhang, S., Wang, X., Liu, H., & Shen, W. (2014). Controllable light-induced conic structures in silicon nanowire arrays by metal-assisted chemical etching. Nanotechnology, 25(2).