simple 2D corridor C bounded by straight line segments and arcs of ra- dius 2r, the ... vature, and then use this lower bound to design a (1 + ϵ)-approximation algorithm ... two points s and t at each end of C, compute a minimum energy path P cross- ..... In each case of Ci, Bmax is always inside Ci and the accumulative angle.
Approximating Minimum Bending Energy Path in a Simple Corridor? Jinhui Xu
Lei Xu
Yulai Xie
Department of Computer Science and Engineering State University of New York at Buffalo Buffalo, NY 14260, USA {jinhui,lxu,xie}@buffalo.edu.
Abstract. In this paper, we consider the problem of computing a minimum bending energy path (or MinBEP) in a simple corridor. Given a simple 2D corridor C bounded by straight line segments and arcs of radius 2r, the MinBEP problem is to compute a path P inside C and crossing two pre-specified points s and t located at each end of C so that the bending energy of P is minimized. For this problem, we first show how to lower bound the bending energy of an optimal curve with bounded curvature, and then use this lower bound to design a (1 + ²)-approximation algorithm for this restricted version of the MinBEP problem. Our algorithm is based on a number of interesting geometric observations and approximation techniques on smooth curves, and can be easily implemented for practical purpose. It is the first algorithm with a guaranteed performance ratio for the MinBEP problem.
1
Introduction
In this paper, we consider the following minimum bending energy path (MinBEP) problem: Given a simple corridor C bounded by the straight line segments and arcs of radius 2r (a precise definition of simple corridor is given later) and two points s and t at each end of C, compute a minimum energy path P crossing s and t and traversing the corridor C. The energy of a smooth path P is measured by its bending energy Eb . The bending energy was suggested by Bernoulli in 1738 and studied intensively for the case of planar curves by Euler [2]. Given a smooth parameterized planar curve s, its bending energy is defined Ras the integral of the squared curvature over the length of the curve, i.e., Eb = s κ2 ds, where κ is the curvature of the curve at point s. Let s(t) = (x(t), y(t)) be the parametrization of an arbitrary point on a smooth curve. Then the curvature [14] of the curve at s(t) is given by κ(t) =
˙ y(t)− ¨ ˙ x(t) ¨ x(t) y(t) . ˙ 2 +y(t) ˙ 2 )3/2 (x(t)
Intuitively, the curvature of a smooth curve at point
s(t) is defined as the inverse of its minimum curvature radius (i.e., the radius of the osculating circle at s(t)). The MinBEP problem considered in this paper is ?
The research of this work was supported in part by National Science Foundation (NSF) through a CAREER award CCF-0546509 and a grant IIS-0713489.
motivated by applications in intervational procedures for cardiovascular surgery [12, 13]. The guidewire problem can be formulated as a MinBEP problem in 3D. In this paper we consider the 2D case. The framework of our approach is readily applicable to the 3D case. Due to the wide use of elastic curves in many fields, the minimum energy path problem has been extensively studied in the past. Most of the studies have focused on computing closed or knotted elastic curves with prescribed boundary conditions and fixed length [8, 6, 3, 9]. Almost all of them are based on numerical techniques. For unknotted curves, several results are known for solving the guidewire problem [12, 13]. Bending energy has also been used in computational biology for understanding the cellular processes [5]. In this paper, we consider the problem of approximating the 2D MinBEP problem. To fix the problems associated with existing solutions (e.g., [12, 13]), we expect that the computed path (1) has a bending energy close to optimal, (2) is smooth at every point, and (3) can be computed efficiently. To achieve these goals, our strategy is to first solve a constrained version of the problem. In this constrained version, we require that the to-be-computed path P have a bounded curvature κmax . Once we obtain solutions to the curvature bounded MinBEP problem, we can then perform a binary search on the maximum curvature to find the best solution to the MinBEP problem. Thus our focus is on the curvature bounded minimum bending energy path problem. Thus our goal for the MinBEP problem is to obtain a good approximation solution. We first use a set of recursive shortest paths and local features of the corridor to establish a lower bound on the energy of an optimal solution as well as the possible energy distribution. With this lower bound, we then place various types of grid points to discretize the continuous space and guess the positions of the optimal path. We show that it is possible to obtain a (1 + ²)-approximation from the discretized space. Our algorithm runs in near quadratic time and can be easily implemented for practical purpose. To our best knowledge, this is the first quality guaranteed solution to the MinBEP problem.
2
Preliminaries
Let D be a disk of radius r. A pipe is a rectangle with a fixed width of 2r and a non-fixed length e. An elbow is a sector with a fixed radius of 2r and a non-fixed center angle of π − θ for some 0 ≤ θ ≤ π. A corridor is a set of alternatively appearing pipes and elbows concatenated in a way that the radius of each elbow completely overlaps with the side of a neighboring pipe with length 2r. A corridor C is simple if every pipe or elbow does not intersect the interior of any other pipe or elbow, and non-simple otherwise (see Figure 1). Clearly, there is no hole in a such defined simple corridor. Each elbow together with its two adjacent pipes forms an elbow region ER (see Figure 2). Let η = {v1 , v2 , . . . , vn } be the centerline of C. It is easy to see that η is a simple 2D curve, where the edge between every pair of consecutive vertices vi and vi+1 is either a straight line segment or an arc of radius r which alternatively
t η
e1
t
s
u
e2
θi
s u01
(a)
(b)
u02 u1
u2
Fig. 1. (a) A simple corridor C; (b) A non-simple corri- Fig. 2. An elbow region ER. dor C 0 .
appears along η. Thus C can also be viewed as the Minkowski sum η ⊕ D of η and D. The corridor C is bounded by straight line segments and arcs. Let Cu and Cl be the upper and lower boundary of C, separated from the two ends of C (Assume that the segment v1 vn is horizontally oriented.) Let {u1 , u2 , . . . , un } and {w1 , w2 , . . . , wn } be the vertices of Cu and Cl respectively. Thus the edges between consecutive vertices in Cu and Cl are either segments or arcs. It is also easy to see that for each vertex in the boundary of C, if it is adjacent to two segments, then it is a reflex vertex (i.e., the inner angle is larger than π).
3
Lower Bound of the MinBEP
To design a quality guaranteed algorithm for the MinBEP problem, we need to know the minimum energy of an optimal solution, i.e., the lower bound of the MinBEP path. We lower bound (1) the arc length of the portions of an optimal curve where the curvature is non-zero, (2) the curvatures at those portions. We first consider the problem of lower bounding (1). To estimate the curve length of (1), we consider the shortest path inside the corridor C. From [4], we know that the shortest path inside a simple polygon can be computed in linear time. (Note that although the corridor C is not a simple polygon, we can easily convert it into a simple polygon by replacing each arc with a convex polygonal curve around the arc.) Let SP be the shortest path inside C with starting point s and ending point t. We assume that s and t are not visible to each other in C (since otherwise the segment st will be the trivial shortest path and also the minimum bending energy path in C). Clearly, SP consists of a set of straight line segments and has unbounded curvature. Let Vsp = {s1 , s2 , . . . , sk } be the set of interior vertices of SP (i.e., excluding s which is s0 and t which is sk+1 ) with the indices following their orders along SP . Let V´ be the set of reflex vertices in the boundary ∂C of the corridor C. Clearly the boundary curve ∂C is non-differentiable at any point in V´ . The following lemma shows that the shortest path SP makes turns only at reflex vertices. Lemma 1. Vsp ⊆ V´ . Given any pair of consecutive vertices si and si+1 on the shortest path SP , let s0i and s0i+1 be the two closest (to si si+1 ) intersection points of ∂C and the
supporting line of segment si si+1 , where s0i (or s0i+1 ) is the intersection point closer to si (or si+1 ) than si+1 (or si ). Let M be an arbitrary curvature-bounded smooth curve traversing the corridor C with the same starting and ending points s and t as SP , and κmax be its maximum curvature. Let M (t) be the parametrization of M with time t as the parameter, where t1 ≤ t ≤ t2 and s = M (t1 ) and t = M (t2 ) (i.e., we view the curve M as the loci of a point moving with unit speed). T Lemma 2. kM s0i s0i+1 k ≥ 2 for any 1 < i < k (i.e., M intersects s0i s0i+1 at least twice and each intersection could be a consecutive portion of M overlapping with s0i s0i+1 ). Lemma 3. kM
T
ss01 k ≥ 2 and kM
T
s0k tk ≥ 2.
−−→ → Let si ∈ Vsp be any interior vertex of SP , and αi = 6 h− si−1 si , − si− s− i+1 i be − − − → − − − →i = − − − → − − − → 6 the minor angle between vectors si−1 si and si si+1 . Clearly, hsi−1 si , si si+1 6 π − si−1 si si+1 . Let r(si , si−1 ) be the ray emitting from si and crossing si−1 , and s0i−1 be the first intersection point of r(si , si−1 ) ∩ ∂C after passing si−1 . Similarly, we have r(si , si+1 ) and s0i+1 . The two rays r(si , si−1 ) and r(si , si+1 ), together with the portion of ∂C on the opposite side of si form a closed region in C. We denote it as Ci , and call it the turning region of si . Let ei,i−1 be the segment of si s0i−1 if si and si−1 are on the same side of ∂C, and si si−1 otherwise. Similarly, we have ei,i+1 . Clearly, ei,i−1 and ei,i+1 separate the turning region Ci from the remaining part of C. ˙ x ) be the unit Let x be any point in M with x = M (tx ), Tx = x˙ = M (t tangent vector of M at point x (i.e.,kTx k = kxk ˙ = 1), and κx be the curvature of M at x. To simplify our discussion, from now on we assume every vector is a unit vector (unless we specify otherwise). Lemma 4. Let M be any planar smooth curve with non-zero curve length and 4x1 x2 x3 be any triangle with x1 ∈ M . Then there exists a point y in M but not in 4x1 x2 x3 . Lemma 5. Let si ∈ Vsp be any interior vertex of SP and M be any T smooth curve in C (between s and t). There exist two points m1 and m2 in M Ci so that 6 hTm1 , Tm2 i > αi , where Tm1 and Tm2 are the unit tangent vectors of m1 and m2 respectively. Next we consider the case that SP has only one or two interior points, i.e., Vsp = {s1 } or Vsp = {s1 , s2 }. Lemma 6. If Vsp = {s1 } or Vsp = {s1 , s2 }, then ∃m1 ∈ M , and ∃m2 ∈ M , such that αi < 6 hTm1 , Tm2 i for i ∈ {1, 2}. Corollary 1. Let si ∈ Vsp be any interior vertex of SP , and M be any smooth curve in Ci intersecting both ei,i−1 and T ei,i+1 at a position other than si . Then there exist two points m1 and m2 in M Ci such that 6 hTm1 , Tm2 i > αi .
Lemma 7. Let M be a smooth curve in C between s and t with maximum curvature of κmax . Then the arc length of the portion of M with non-zero curvature αi in Ci is at least κmax . Let Ei be the bending energy of P in Ci . Then to lower bound Ei , we need to determine the curvature of this portion of P . Lemma 8. Among all smooth curves with an accumulated angle change of αi , the curve with the same curvature at every point has the minimum bending energy. Definition 1. An elbow in C is a short elbow if SP does not touch its reflex vertex u. An elbow region containing a short elbow is called a short elbow region. We have two cases about the turning region Ci : (A) Ci contains no short elbow, and (B) Ci contains at least one short elbow. We first consider case (A). As discussed above, Ci is bounded by segment ei,i−1 and ei,i+1 . Let s00i−1 (s00i+1 ) be the farthest endpoint of ei,i−1 (ei,i+1 ) away from si . Clearly, s00i−1 (s00i+1 ) is same as s0i−1 (s0i+1 ) if si and si−1 (si+1 ) are on the same side of ∂C and si−1 ( si+1 ) otherwise. Thus we have four cases of Ci depending on whether s00i−1 = si−1 and s00i+1 = si+1 .Let ERi be the elbow region in Ci with reflex vertex u = si and an outer angle of θi (see Figure 2). Let uu1 and uu2 be the two incident edges of u, e1 and e2 be the corresponding edges of uu1 and uu2 on the opposite side of ∂C, and u01 and u02 be the corresponding vertices of u1 and u2 . Let |ei |, i ∈ {1, 2}, denote the length of ei , and w denote the width of C. Clearly |uu1 | = |e1 |, |uu2 | = |e2 |, and w = 2r. To determine ri , we need to first find Bmax in Ci . Based on the relationships of Bmax and ERi , we have four subcases to consider. A.1 Bmax is tangent to both e1 and e2 at their interior points. Bmax starts and ends at the two tangent points. In this case, si is incident to Bmax due to the fact that Bmax is the largest circular arc, the following conditions θi θi w w are satisfied. < |e1 |, and < |e2 |. Since ri = θi cos 2 θi cos 2 1−sin
1−sin
2
ri sin θ2i + w, we have ri =
w . 1 − sin θ2i
2
(1)
A.2 Bmax is tangent to e1 only. In this case, si and s00i+1 are incident to Bmax . Bmax starts at the tangent point of e1 and ends at s00i+1 . A.3 Bmax is tangent to e2 only. This is the symmetric case of Case 2. In this case, si and s00i−1 are incident to Bmax . Bmax starts at s00i−1 and ends at the tangent point of e2 . A.4 Bmax is tangent to none of e1 and e2 . This implies that si , s00i−1 and s00i+1 are all incident to Bmax , and Bmax starts at s00i−1 and ends at s00i+1 . Thus we have q 1 ri = |ei,i−1 |2 + |ei,i+1 |2 − 2|ei,i−1 ||ei,i+1 | cos θi . (2) 2 sin θi
Since our goal is to lower bound Ei and cos θi > −1 (i.e., 0 < θi < π) in equation (2), we can choose ri =
1 (|ei,i−1 | + |ei,i+1 |). 2 sin θi
(3)
In each case of Ci , Bmax is always inside Ci and the accumulative angle change of Bmax is αi (by Corollary 1). The following lemma follows directly from the above analysis. Lemma 9. In case (A), Bmax has only the above 4 cases and ri is a function of the local features (i.e., w, θi , |e1 |, e2 |, |ei,i−1 | and |ei,i+1 |) of Ci . Lemma 10. ri in case A.3 (or A.2) can be computed by using either equation (1) as in case A.1 or equation (3) as in case A.4. Lemma 11. The optimal curve P in the turning region of Ci in case (A) has a bending energy Ei > Eil =
αi 2 αi 1 ,, κ = κmax i κmax ri2
(4)
where Eil is the lower bound of Ei . Now we consider case (B) (i.e., Ci contains at least one short elbow). We consider two subcases: (B.1) Ci contains exactly one short elbow, and (B.2) Ci contains more than one short elbows. B.1: Let ERk be the only short elbow region in Ci with reflex vertex k and k 0 be the middle point of the arc of ERk . We first partition Ci , as well as 0 Ci+1 , into two parts by introducing the segment kk 0 . Let Ci0 and Ci+1 be the adjusted turning regions of si and si+1 respectively. Obviously, kk 0 intersects the optimal curve P . Let pk be the intersection point, and assume that the exact position of pk is known in advance (in next section, we will show how to guess the positions of pk ). With pk , we can then compute the shortest paths SPsi−1 ,pk and SPpk ,si+1 between si−1 and pk and between pk and si+1 0 respectively. This will give us more accurate α angles αi0 , αi+1 at si and si+1 . Further, we can use a similar approach as in case (A) to derive better lower bounds of the bending energy for the portion of P in turning regions Ci0 and 0 Ci+1 respectively by using SPsi−1 ,pk and SPpk ,si+1 . The only difference is 0 that Bmax ends (or starts) at pk in Ci0 (or Ci+1 ). B.2: Let {ER1 , ER2 , · · · , ERm } be the sequence of short elbow regions in Ci between si−1 and si+1 , with reflex vertices {k1 , k2 , · · · , km }. Assume that we know pm (same as pk in case B.1) in advance. We can then compute shortest paths SPsi−1 ,pm , SPpm ,si+1 , and SPsi ,si+1 (if necessary), and adjust the turning regions for si−1 , si and si+1 . If there is some short elbow in any of the adjusted turning regions (based on the newly computed shortest paths), we can recursively apply the above strategy to adjust the turning regions and shortest paths until we eliminate all short elbows.
Lemma 12. The bending energy of an optimal curve P is at least k
El =
1X l E. 2 i=1 i
(5)
where Eil is the lower bound on the bending energy of P in Ci .
4
Approximation algorithm for computing MinBEP
In this section, we present a (1+²)-approximation algorithm for the MinBEP problem with bounded curvature. Let Eb be the bending energy of an optimal curve P and Ea be the bending energy of the path PA computed by our algorithm. To achieve this, we first compute the shortest path SP in C and then isolate the task of approximating the optimal curve within each turning region (based on SP ). For every turning region, we first sample a set of points as the possible positions for the optimal curve to either pass through or appear in their neighborhoods. Then we connect those sample points by smooth curves to form a network or graph G so that there exists at least one smooth curve in G which is geographically close (i.e. has a small Hausdorff or Fr´echet distance) to the optimal curve P and differs in bending energy from P by only a small constant factor. Lemma 13. For any smooth curve Pc with bending energy Ec in the corridor C, after isotropic scaling with scale factor γ, the bending energy Ec0 of the scaled curve Pc0 is γ1 Ec . The above lemma suggests that isotropic scaling does not affect the performance ratio of an approximate path. Thus, to design a (1 + ²)-approximation for the MinBEP problem, we can first choose an appropriate factor to scale the corridor C so that the width w becomes a large enough constant (depending on κmax ), and then compute a (1+²)-approximating path PA in the scaled corridor. 4.1
Sampling points (Problem (1)):
To sample the possible positions of the optimal curve P , we have two subproblems to consider: (i) How to sample points inside a turning region Ci in case (A); (ii) How to sample points inside a turning region Ci in case (B). To solve sub-problem (i), we first determine Bmax which could span over at most three elbow regions. Let a and b be the two endpoints of Bmax , and la and lb be the two lines which cross a and b respectively and are orthogonal to the center line η. We denote the region of C bounded by la and lb as ϕi (which could be either a subset or superset of Ci ). From Lemma 11, we know that it is sufficient to focus only on ϕi when sampling points for Ci . To sample points in ϕi , consider the elbow region ERi in Ci with reflex point u (i.e., si = u). Let ERi0 be the extended elbow region of ERi by enlarging or
shortening the length of its two pipes so that ϕi is barely contained inside ERi0 . To simplify our discussion on sampling points for ϕi , we can first sample points in ERi0 and then throw away all points outside of ϕi to obtain the points for ϕi . Thus we will focus on ERi0 only. Our idea for sampling points in ERi0 is to place a bended grid in ERi0 so that there always exists a set of grid points close to P .In a normal grid, the grid points are the intersections of a set of evenly spaced horizontal and vertical lines. In an elbow region, however, since the corridor is bended, our grid bends around the elbow. The “horizontal” lines in our grid are evenly spaced curves “parallel” to the center line η of the corridor C. The “vertical” lines in the two pipes are evenly spaced lines orthogonal to the boundary edges of the pipes, and the “vertical” lines in the elbow are evenly spaced rays emitted from the reflex point u. The intersections of the “horizontal” and “vertical” lines forms the set of grid points. Let ∆s0 be the distance between two neighboring “horizontal” lines and ∆s be the maximum distance between two neighboring ”vertical” lines. We choose 2 ∆s0 = κmax . To determine the value for ∆s, we only consider two types of Ci in cases A.1 and A.4, since case A.2 or A.3 can be reduced to one of them. More specifically, we let ∆s = ∆sp for a pipe of ERi0 and ∆s = ∆se for the elbow. Depending on the types of Ci , we have the following choices for ∆s. A.1 : ∆sp =
w cos
θi 2
κmax αi (1−sin
θi 3 2 )
and ∆se =
A.4 : We have two subcases A.4.1: If |ei,i−1 | + |ei,i+1 | ≤ and ∆se =
w(π−θi ) κmax αi (1−sin
2w θ , then 1−sin 2i w(π−θi ) . θ κmax αi sin2 θi (1−sin 2i )2 2w 1−sin
A.4.2: If |ei,i−1 | + |ei,i+1 | > (π−θi )(|ei,i−1 |+|ei,i+1 |) 4wκmax αi sin2 θi
2
θi 2
∆sp =
, then ∆sp =
θi 2 2 )
.
w κmax αi sin2 θi (1−sin
(|ei,i−1 |+|ei,i+1 |)3 8κmax αi sin2 θi w2
θi 3 2 )
,
and ∆se =
.
Our idea is to guess the position of P by placing grid points in the last short elbow ERk in Ci (see case B.2). More specifically, let kk 0 be defined as in case B.1 in last section (i.e., the segment connecting the reflex vertex and the middle point of the arc). We place a set of grid points evenly spaced in kk 0 2 with a separating distance of ∆0s = κmax . With the set of grid points, we can then recursively compute higher level shortest paths starting from (or ending at) each grid point to obtain the adjusted turning region as well as αi angle for each reflex point in the set of shortest paths. For an adjusted turning region with multiple αi values (from different grid points), we can use the same approach as in case (A) to obtain a set of densities (i.e., ∆s) values of the grid and choose the densest one for its grid. It is sufficient to find the grid point on kk 0 that maximizes αi . (The maximum αi means the densest grid points for the corresponding turning region.) Thus we choose the extreme point on kk 0 to compute αi . Once we have this information, it can be reduced to case (A). In case (B.2), for each short elbow in Ci , we place
kk 0 with grid points as discussed above. For each kk 0 , we compute the maximum αi as in case (B.1) and thus choose a set of extreme grid points on each kk 0 . Then sampling grid points in each adjusted turning region is one subcase of case (A). In this way, we could sample points inside a turning region Ci in case (B). q ϕi
c01 c02
Bmax ti
θi
li
c2 c1 p l
t0i
l0i
ERi (a)
1
2
(b)
3
4
l0 (c)
Fig. 3. (a)ϕi ; (b) Weakly visible segments. (c)Connect circles by tangent line segments
Our algorithm has to be able to produce a 0-energy path if P has 0 bending energy. We adopt two strategies to ensure this, (1) adding inter-elbow grid points and (2) adding inter-elbow edges in the graph G. We discuss our ideas on (1) next and (2) in next section. Now we discuss how to generate inter-elbow grid points. This type of grid points is necessary. Let si and si+1 be two consecutive interior vertices of the shortest path SP . Let {ER1 , ER2 , · · · , ERj } be the sequence of short elbow regions between si and si+1 , ϕi and ϕi+1 be the corresponding grid region of si and si+1 . If P has zero-curvature in those short elbow regions while the grid points are not dense enough in ϕi and ϕi+1 , it is possible that the grid points in ϕi and ϕi+1 are not visible to each other. Consequently, PA will be forced to use a small amount of energy to pass each short elbow region and the total energy could be relatively large. Thus, it is difficult to guarantee the performance of PA . Actually, this scenario may occur as long as any vertical line segment lvi in ϕi and any vertical line segment lvi+1 in ϕi+1 are weakly visible to each other, but there is no grid point visible to each other. ( Two segments lvi and lvi+1 are weakly visible to each other if there exists a pair of visible points on lvi and lvi+1 respectively.) Moreover, increasing the density of ϕi and ϕi+1 does not solve the problem since the visible tunnel between lvi and lvi+1 could be very narrow (i.e., close to a line segment). To overcome this difficulty, our idea is to place inter-elbow grid points. We first compute each shortest path map (using the algorithm in [11]) of the endpoints of lvi and endpoints of each vertical line lk not in ϕi . For this purpose, we first convert C into a simple polygon CP by replacing each arc with a convex polygonal curve around the arc. It is easy to see that expanding the corridor in this way does not affect the shortest maps of the endpoints of lvi and endpoints of lk , since the shortest path between any pair of vertices will never go out of C. Then we determine the cusp vertices on the shortest path in constant time. Clipping lvi and lk by the common tangent lines defined by these cusp vertices
gives the portion e and e0 (in constant time). Thus if the total number of vertical lines is O(n), the worst running time of the above algorithm is O(n2 ). Moreover, since ∆s0 is a constant, each vertical line lvi could be charged at most two interelbow grid points by simple amortized analysis even if the weakly visible portion is distinct for distinct pair of vertical lines. In Figure 3(b), there are four vertical line segments. Segment 1 is weakly visible by segment 2, 3, 4 in different portions specified by dotted, dashed and solid arrow headed lines. We have the following lemma. Lemma 14. The total number of grid points is O(n) 4.2
Connecting the grid points (Problem (2)):
In this section, we discuss our idea on how to connect the set of grid points. To ensure the resulting path is smooth, for each grid point our idea is to first draw a set of circles tangent to the corresponding “horizontal” line (from both sides of the horizontal line) at the grid point with curvatures 0,∆κ, 2∆κ, . . . , κmax (the set of circles are said to be associated with the grid point), and then connect every pair of circles generated at different grid points by a tangent segment (i..e, a segment tangent to both circles) which is fully inside C. To determine ∆κ, consider Figure 3(c). Let l and l0 be two consecutive “vertical” lines of the grid, and p be a grid point on the vertical line l associated with two circles c1 and c2 with curvature κ1 and κ2 respectively and satisfying the condition |κ1 − κ2 | ≤ ∆κ. Let q be a grid on l0 associated with two circles c01 and c02 in a similar way. Let ∆Eκ1 (∆Eκ2 ) be the bending energy for a smooth curve using part of c1 ( c2 ) and c01 ( c02 ) to travel through the portion of C between l and l0 . Let en be the total number of vertical lines of the grid passed by P in ϕi . Our idea is to choose ∆κ such that the following inequality holds. en |∆Eκ1 − ∆Eκ2 | ≤
1 l ²E . 2 i
(6)
The idea behind the above inequality is to ensure that the difference of bending energy between any pair of smooth curves that travel through the region ϕi with a curvature difference no more than ∆κ is within a ²-factor. To find the exact value of ∆κ, we consider case A.1 and A.4 since other cases are similar. In case A.1,it is easy to see that en = ( satisfies
|∆Eκ1 − ∆Eκ2 | ≤ 2(
2w cos (1−sin
θi 2
θi 2
)∆sp
+
w(π−θi ) ∆se ).
Thus, |∆Eκ1 − ∆Eκ2 |
κ21 π κ22 π κ02 π κ02 π − + 10 − 20 ) ≤ 4∆κπ. κ1 κ2 κ1 κ2
(7)
By plugging (7) into (6), we have ∆κ ≤ 24πκ2² w2 . Thus we can choose ∆κ = max ² 24πκ2max w2 . We obtain the same result for case A.4. The lemma below follows from Lemma 14 and the fact that ∆κ is a constant. Lemma 15. The total number of circles in C is O( n² ).
Now we discuss our idea on how to connect the circles associated with different grid points. Let c1 and c2 be two circles associated with different grid points. c1 and c2 may be (1) in the same elbow region or (2) in different elbow regions. In (2), we have to add inter-elbow edges into G to ensure that the path we computed has 0 energy in the region if P has 0 energy in the same region. To connect c1 and c2 , we first compute the four possible tangent segments between c1 and c2 . Since only those tangent segments inside C are generated, we have to determine the visibility of the endpoints of each tangent segment. This implies that we need to check the visibility for the endpoints of every tangent segment. To solve this problem more efficiently, we treat each pair of the endpoints (i.e., tangent points) as a visibility query, and build a data structure to answer those queries. Our idea is to use the optimal data structure developed in [15]. In this paper, a data structure was presented for solving the ray shooting problem inside a simple polygon P O with n vertices. In particular, it was shown that the data structure of size n can be preprocessed in O(n log n) time, and for each pair (q, u) of point q and direction u, it finds in O(log n) time the first edge of P O intersected by the ray emitting from q moving in the direction of u. To make use of this data structure, we first convert the corridor into a simple polygon CP and then build the data structure for CP . Thus, for each tangent segment, we can determine whether it is an interior tangent segment of C in O(log n) time. The tangent points on each circle ci partitions ci into a linear number (in terms of the number of tangent points) of arcs. Some arcs may go outside of the corridor. Since each circle is drawn using the local feature of the elbow region, we can determine whether it is entirely inside C in O(1) time. Lemma 16. The total number of interior arcs and interior tangent segments is 2 O( n²2 ) in the worst case. With the set of interior tangent segments and arcs, we can now construct the graph G. In this graph, the vertices are the set of interior arcs. Each arc has an edge to its two neighboring arcs in the same circle. For two arcs in different circles, there is an edge between them if and only if the following two conditions are met: (i) There is an interior tangent segment connecting them (i.e., the tangent segment is between a pair of endpoints of the two arcs); (ii) The two arcs and the tangent segment together form a smooth curve. Thus there are two types of edges in G, tangent segments and edges connecting neighboring arcs in the same circle. Since the number of the second types of edges is no more than that of the arcs, the total number of edges is still bounded by O(n2 /²2 ). Also note that in the above visibility query computation, we treat s and t as circles of radius 0. Thus s and t are vertices of G and are connected to other vertices by tangent segments. The weight of each edge is 0 and the weight of each vertex is the bending energy of the corresponding arc. The lemma below follows directly from Lemma 16 and the above construction of the graph. 2
2
Lemma 17. In graph G, |V | = O( n²2 ) and |E| = O( n²2 ) in the worst case. Furthermore, for any path in G, its corresponding path is a smooth curve in C.
4.3
The existence of a smooth curve with similar bending energy (Problem 3):
Lemma 18. There exists a curve Ps in G close to P with bending energy Es ≤ (1 + ²)Eb , where Eb is the bending energy of P . The theorem below follows from all previous lemmas and the shortest path algorithm (e.g., Dijkstra’s algorithm) running in O(V log V + E) time. Theorem 1. There exists a (1 + ²)-approximation algorithm for the curvature bounded MinBEP problem with worst case running time O(( n² )2 log( n² )). Acknowledgments The authors would like to thank Professor Joseph S.B. Mitchell for helpful discussion on this problem.
References 1. L. Dubins, “On Curves of Minimal Length with a Constraint on Average Curvature, and with Prescribed Initial and Terminal Positions and Tangents”, American Journal of Mathematics, 79, pp. 497-516, 1957. 2. L. Euler, “Methodus inveniendi lineas curvas maximi minimive propriatate gaudentes, sive solutio problematis isoperimetrici lattisimo sensu accepti”, Bousquet, Lausannae et Genevae, E65A. O.O. SER. I, Vol 24, 1744. 3. M. Freedman, Z. He, Z. Wang, “On the Mobius Energy of Knots and Unknots”, Annals of Mathematics, 139, No. 1, pp. 1-50, 1994. 4. L. Guibas, J. Hershberger, D. Leven, M. Sharir, R. Tarjan, “Linear Time Algorithm for Visibility and Shortest Path Problems Inside Simple Polygons”, Proceedings of the Second Annual ACM-SIAM Symposium on Computational Geometry, 1986. 5. R. Heekeren, F. Faas, L. Vliet, “Finding the Minimum-Cost Path Without Cutting Corners”, Lecture Notes in Computer Science, 4522, 2007. 6. T. Ivey, D. Singer, “KNOT TYPES, HOMOTOPIES AND STABILITY OF CLOSED ELASTIC RODS”, Proceedings of the London Mathematical Society, 79, pp. 429-450, 1999. 7. J. Langer, D. Singer, “Knotted Elastic Curves in R3 ”, Journal of London Math. Society (2), 30, pp. 512-520, 1984. 8. H. von der Mosel, “Minimizing the Elastic Energy of Knots”, Journal of Asymptotic Analysis, 18, 1-2, pp. 49-65, 1998. 9. J. O’Hara, “Energy of a Knot”, Topology, 30, pp. 241-247, 1991. 10. A. Pressley, “Elementary Differential Geometry”, Springer-Verlag London, 2001. 11. J. R. Sack and J. Urrutia, ”Handbook of computational geometry”, North-Holland Publishing Co., pages 854-855, 2000. 12. S. Schafer, V. Singh, K. Hoffmann, P. No¨el, J. Xu, “Planning image-guided endovascular interventions: guidewire simulation using shortest path algorithms”, Proceedings of the SPIE, 6509, 2007. 13. S. Schafer, V. Singh, P.B. No¨el, J. Xu, A. Walczak, K. R. Hoffmann, “Real Time Endovascular Guidewire Position Simulation using Shortest Path Algorithms”, International Journal of Computer Aided Radiaology and Surgery (IJCARS), 4:597608, 2009. 14. J. Thorpe, “Elementary Topic in Differential Geometry”, Springer-Verlag, 1979. 15. B. Chazelle and L.J. Guibas, “Visibility and intersection problems in plane geometry,” Discrete and Computational Geometry, volume 4(6), pages 551-581, 1989.