20.02.2013 Views

Shortest path in a multiply-connected domain having curved ...

Shortest path in a multiply-connected domain having curved ...

Shortest path in a multiply-connected domain having curved ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Accepted Manuscript<br />

<strong>Shortest</strong> <strong>path</strong> <strong>in</strong> a <strong>multiply</strong>-<strong>connected</strong> doma<strong>in</strong> hav<strong>in</strong>g <strong>curved</strong><br />

boundaries<br />

S. Bharath Ram, M. Ramanathan<br />

PII: S0010-4485(12)00279-5<br />

DOI: 10.1016/j.cad.2012.12.003<br />

Reference: JCAD 2030<br />

To appear <strong>in</strong>: Computer-Aided Design<br />

Received date: 7 June 2012<br />

Accepted date: 4 December 2012<br />

Please cite this article as: Bharath Ram S, Ramanathan M. <strong>Shortest</strong> <strong>path</strong> <strong>in</strong> a<br />

<strong>multiply</strong>-<strong>connected</strong> doma<strong>in</strong> hav<strong>in</strong>g <strong>curved</strong> boundaries. Computer-Aided Design (2012),<br />

doi:10.1016/j.cad.2012.12.003<br />

This is a PDF file of an unedited manuscript that has been accepted for publication. As a<br />

service to our customers we are provid<strong>in</strong>g this early version of the manuscript. The manuscript<br />

will undergo copyedit<strong>in</strong>g, typesett<strong>in</strong>g, and review of the result<strong>in</strong>g proof before it is published <strong>in</strong><br />

its f<strong>in</strong>al form. Please note that dur<strong>in</strong>g the production process errors may be discovered which<br />

could affect the content, and all legal disclaimers that apply to the journal perta<strong>in</strong>.


<strong>Shortest</strong> <strong>path</strong> <strong>in</strong> a <strong>multiply</strong>-<strong>connected</strong> doma<strong>in</strong> hav<strong>in</strong>g<br />

<strong>curved</strong> boundaries<br />

S. Bharath Ram and M. Ramanathan, ∗<br />

Department of Eng<strong>in</strong>eer<strong>in</strong>g Design,<br />

Indian Institute of Technology Madras,<br />

Chennai 600036, India<br />

{bharathsram, emry01}@gmail.com<br />

Abstract<br />

Comput<strong>in</strong>g shortest <strong>path</strong>, overcom<strong>in</strong>g obstacles <strong>in</strong> the plane, is a well-known geometric<br />

problem. However, widely assumed obstacles are polygonal <strong>in</strong> nature. Very few<br />

papers have focused on the <strong>curved</strong> obstacles, and <strong>in</strong> particular, for <strong>curved</strong> <strong>multiply</strong><strong>connected</strong><br />

doma<strong>in</strong>s (doma<strong>in</strong>s hav<strong>in</strong>g holes). Given a set of parametric curves form<strong>in</strong>g a<br />

<strong>multiply</strong>-<strong>connected</strong> doma<strong>in</strong> (MCD), with one closed curve act<strong>in</strong>g as an outer boundary<br />

and several non-<strong>in</strong>tersect<strong>in</strong>g <strong>in</strong>ner curves (loops) as represent<strong>in</strong>g holes and two dist<strong>in</strong>ct<br />

po<strong>in</strong>ts S and E ly<strong>in</strong>g on the outer boundary, this paper provides an algorithm to f<strong>in</strong>d<br />

shortest <strong>in</strong>terior <strong>path</strong> (SIP) between the two po<strong>in</strong>ts <strong>in</strong> the doma<strong>in</strong>. SIP consists of<br />

portions of curves along with straight l<strong>in</strong>e segments that are tangential to the curve.<br />

The algorithm <strong>in</strong>itially computes po<strong>in</strong>t-curve tangents (PCTs) and bitangents (BTs)<br />

us<strong>in</strong>g their respective constra<strong>in</strong>ts. A generalized region lemma is proposed, which is<br />

then employed to remove PCTs/BTs that will not contribute to the potential <strong>path</strong> and<br />

subsequently aid<strong>in</strong>g <strong>in</strong> remov<strong>in</strong>g a few <strong>in</strong>ner loops. The algorithm is designed to explore<br />

all potential <strong>path</strong>s. Merg<strong>in</strong>g of <strong>path</strong>s is also proposed to avoid redundant computations.<br />

F<strong>in</strong>al SIP is chosen from potential <strong>path</strong>s us<strong>in</strong>g the length of each <strong>path</strong>. The algorithm<br />

also has the potential to give all <strong>path</strong> of equal lengths contribut<strong>in</strong>g to shortest <strong>path</strong><br />

(with<strong>in</strong> a tolerance level). As the algorithm computes all the potential <strong>path</strong>s on the<br />

fly, there is no need to employ visibility graph to compute the shortest <strong>path</strong>. Curves<br />

are represented us<strong>in</strong>g non-uniform rational B-spl<strong>in</strong>es (NURBS). The algorithm uses the<br />

curves as such and does not discretise <strong>in</strong>to po<strong>in</strong>t-sets or polygons. Extension to handle<br />

curves with C 1 discont<strong>in</strong>uities and S and E not on the outer boundary has also been<br />

described. Results of the implementation are provided and complexity of the algorithm<br />

is also discussed. This paper follows up the one presented for simply-<strong>connected</strong> doma<strong>in</strong><br />

(SCD) <strong>in</strong> [18].<br />

1 Introduction<br />

Comput<strong>in</strong>g Euclidean shortest <strong>path</strong> between two po<strong>in</strong>ts avoid<strong>in</strong>g obstacles <strong>in</strong> a doma<strong>in</strong> is one<br />

of the fundamental problems <strong>in</strong> geometry. A well-researched problem is the one that <strong>in</strong>volve<br />

∗ Correspond<strong>in</strong>g author. Tel: +91-44-22574734<br />

1


non-<strong>in</strong>tersect<strong>in</strong>g polygonal obstacles (e.g. [14, 19]). A prom<strong>in</strong>ent approach to compute the<br />

shortest <strong>path</strong> for polygonal obstacles is via the visibility graph construction [2] as shortest<br />

<strong>path</strong> is a subset of the visibility graph.<br />

<strong>Shortest</strong> <strong>in</strong>terior <strong>path</strong> (SIP) <strong>in</strong> a <strong>curved</strong> boundary can be thought of as a comb<strong>in</strong>ation<br />

of Euclidean and geodesic, where the SIP will consist of straight l<strong>in</strong>es and arcs of <strong>curved</strong><br />

boundaries [18]. Approximat<strong>in</strong>g <strong>curved</strong> boundaries with polygons generates <strong>in</strong>accuracies <strong>in</strong><br />

SIP and is not satisfactory <strong>in</strong> general [7]. Another approach to compute SIP <strong>in</strong> a <strong>curved</strong><br />

boundary is to sample po<strong>in</strong>ts on the <strong>curved</strong> boundary [12] and then employ a typical shortest<br />

<strong>path</strong> algorithm (such as Dijkstra [1]). The accuracy will depend on the sampl<strong>in</strong>g technique<br />

used and is an approximate computation of the SIP. Algorithm for piecewise-l<strong>in</strong>ear boundaries<br />

such [11] has also been extended to <strong>curved</strong> boundary us<strong>in</strong>g “funnels” <strong>in</strong> [13] assum<strong>in</strong>g the<br />

<strong>in</strong>put (<strong>curved</strong> boundary) is already triangulated. Numerical approximation of shortest <strong>path</strong><br />

<strong>in</strong> <strong>curved</strong> obstacles us<strong>in</strong>g fast-sweep<strong>in</strong>g of Eikonal equations [22] and grid-based approach has<br />

been presented <strong>in</strong> [17].<br />

Very few algorithms have handled the computation of SIP of <strong>curved</strong> boundary without<br />

approximat<strong>in</strong>g with polygons or sample po<strong>in</strong>ts, albeit theoretically. Comput<strong>in</strong>g visibility<br />

graph based on greedy approach pseudo-triangulation for a set of non-<strong>in</strong>tersect<strong>in</strong>g convex<br />

<strong>curved</strong> objects has been presented [16]. A similar approach for convex curves that <strong>in</strong>tersect<br />

transversely has been given <strong>in</strong> [5].<br />

For arbitrarily shape <strong>curved</strong> boundary (not just convex), Bourg<strong>in</strong> and Howe [3] presented<br />

an algorithm us<strong>in</strong>g str<strong>in</strong>g formulation on the <strong>in</strong>tersection of the l<strong>in</strong>e connect<strong>in</strong>g the start and<br />

end po<strong>in</strong>ts with the <strong>curved</strong> boundary. Based on the maximal distance of the curve from the<br />

l<strong>in</strong>e, different cases are del<strong>in</strong>eated to f<strong>in</strong>d the po<strong>in</strong>ts on the curve that belong to the SIP.<br />

Fabel [10] has presented an algorithm for comput<strong>in</strong>g the shortest arcs <strong>in</strong> a closed planar disk.<br />

Both [3] and [10] are theoretical descriptions and no implementation results are provided.<br />

An algorithm with implementation results for simply-<strong>connected</strong> arbitrarily shaped <strong>curved</strong><br />

boundary has been presented <strong>in</strong> [18] us<strong>in</strong>g tangent computation and region check. The major<br />

idea <strong>in</strong> comput<strong>in</strong>g the SIP of <strong>curved</strong> boundaries [3, 10, 18] is to avoid comput<strong>in</strong>g visibility<br />

graph through identify<strong>in</strong>g potential straight l<strong>in</strong>es/arcs of the curves us<strong>in</strong>g strategies such as<br />

maximal distance [3] , region check [18] etc.<br />

To the best of our knowledge, no known algorithm with implementation results is available<br />

for arbitrarily shape <strong>curved</strong> boundary of a <strong>multiply</strong>-<strong>connected</strong> doma<strong>in</strong> (MCD). In this paper,<br />

the aim is to f<strong>in</strong>d the shortest <strong>in</strong>terior <strong>path</strong> (SIP) of a MCD hav<strong>in</strong>g <strong>curved</strong> boundaries,<br />

extend<strong>in</strong>g the algorithm presented <strong>in</strong> [18], us<strong>in</strong>g the basic idea of tangent computation. All<br />

the possible <strong>path</strong>s are directly identified dur<strong>in</strong>g the computation effectively elim<strong>in</strong>at<strong>in</strong>g the<br />

use of algorithms such as Dijkstra. SIP is then identified from the set of <strong>path</strong>s. The follow<strong>in</strong>g<br />

are the key differences from [18].<br />

• In case of simply-<strong>connected</strong> doma<strong>in</strong> (SCD) [18], the focus was on comput<strong>in</strong>g the SIP<br />

itself, s<strong>in</strong>ce SIP was unique. As there will be number of <strong>path</strong>s that could contribute<br />

towards SIP <strong>in</strong> the MCD, <strong>in</strong> this paper, the focus is on elim<strong>in</strong>at<strong>in</strong>g a <strong>path</strong> that will not<br />

play a role <strong>in</strong> the set of potential <strong>path</strong>s. Lemma 3 <strong>in</strong> the paper <strong>in</strong>dicates the <strong>in</strong>teraction<br />

that a <strong>path</strong> can have and the cases for which the <strong>path</strong> will cease to exist.<br />

• In [18], l<strong>in</strong>e connect<strong>in</strong>g S and E was used to divide the boundary curve <strong>in</strong>to two portions.<br />

As such a division is not possible <strong>in</strong> <strong>multiply</strong>-<strong>connected</strong> doma<strong>in</strong> (MCD), Lemma 4 <strong>in</strong> the<br />

2


paper, termed as generalized region lemma (GRL) (a generalized version of the region<br />

check lemma <strong>in</strong> [18]) has been proposed.<br />

• Exterior and <strong>in</strong>terior regions are formulated based on Lemma 4 to elim<strong>in</strong>ate PCTs/BTs/<br />

<strong>in</strong>ner curves that do not further play a role <strong>in</strong> <strong>path</strong> computation.<br />

• Merg<strong>in</strong>g of <strong>path</strong>s (which was not required <strong>in</strong> SIP of SCD) to avoid redundant computation<br />

has also been proposed.<br />

• A tree data structure has been proposed and implemented for stor<strong>in</strong>g and manipulation<br />

of identified <strong>path</strong>s.<br />

• A methodology has been proposed and implemented for curves hav<strong>in</strong>g C 1 discont<strong>in</strong>uities<br />

(which was not handled <strong>in</strong> SCD).<br />

In this paper, the <strong>curved</strong> boundary is assumed to be def<strong>in</strong>ed by a set of non-self-<strong>in</strong>tersect<strong>in</strong>g<br />

closed parametric curves without discont<strong>in</strong>uities (an extension to curves with discont<strong>in</strong>uities is<br />

also discussed with implementation results) and also they do not conta<strong>in</strong> straight l<strong>in</strong>e portions.<br />

The doma<strong>in</strong> is assumed to be <strong>multiply</strong>-<strong>connected</strong>, with one outer boundary (bound<strong>in</strong>g box<br />

replac<strong>in</strong>g the outer boundary has also been discussed) and at least one <strong>in</strong>ner boundary. It is<br />

assumed that, when traveled along the <strong>in</strong>creas<strong>in</strong>g direction of paramaterization of the curve,<br />

its <strong>in</strong>terior lies to its left.The curves are typically def<strong>in</strong>ed by Non-Uniform Rational B-Spl<strong>in</strong>e<br />

(NURBS) [15]. The degree of the curves are assumed such that the <strong>in</strong>flection po<strong>in</strong>ts on the<br />

curve can be captured (i.e. m<strong>in</strong>imum degree of the curve used is 3).<br />

2 Def<strong>in</strong>itions<br />

Let the set of parametric curves be Q = {C0(r0), C1(r1), ... , Coc = Cn(rn)} for which SIP<br />

has to be determ<strong>in</strong>ed. Let S and E lie on the outer boundary curve Coc. All def<strong>in</strong>itions from<br />

Section 2 of [18] are directly applicable and hence not repeated here.<br />

Def<strong>in</strong>ition 1 A <strong>path</strong> is a set of PCTs/BTs which are completely conta<strong>in</strong>ed and curve portions<br />

form<strong>in</strong>g a contiguous segment.<br />

Def<strong>in</strong>ition 2 An extended PCT/BT is the extension (along the direction of PCT/BT) of a<br />

completely conta<strong>in</strong>ed PCT/BT till its first <strong>in</strong>tersection with one of the <strong>in</strong>put curves.<br />

By virtue of this def<strong>in</strong>ition, the extended PCT/BT is also completely conta<strong>in</strong>ed.<br />

Def<strong>in</strong>ition 3 SIP is the shortest among all available <strong>path</strong>s from S to E.<br />

3 Prelim<strong>in</strong>aries/Observations<br />

Lemma 1 SIP consists of only concave portions of outer/<strong>in</strong>ner loops and straight l<strong>in</strong>es that<br />

are completely conta<strong>in</strong>ed <strong>in</strong> the MCD (adopted from [18]).<br />

Lemma 2 The SIP preserve the direction of traversal (clockwise or counter-clockwise) <strong>in</strong> the<br />

<strong>in</strong>put curves [18].<br />

3


It is to be noted that when both S and E lie on the same concave portion, then the SIP is<br />

the portion of the curve C(t) between the two po<strong>in</strong>ts [[3], Theorem 2.7, p220]. Also, straight<br />

portions of SIP are tangential to the concave portions [18].<br />

Def<strong>in</strong>ition 4 A BT is said to be consistent with respect to a <strong>path</strong> if it preserves the direction<br />

of traversal of the <strong>path</strong> as stated <strong>in</strong> Lemma 2 .<br />

It is also to be noted that, only one SIP is possible for a SCD, jo<strong>in</strong><strong>in</strong>g two dist<strong>in</strong>ct po<strong>in</strong>ts,<br />

ly<strong>in</strong>g on the boundary or <strong>in</strong>terior [[21], Theorem 6.1, p147], which does not hold good for a<br />

MCD.<br />

Suppose that there is an SIP for a set curves constitut<strong>in</strong>g MCD. If an <strong>in</strong>ner loop is added,<br />

it should be observed that the entire SIP can change altogether. This suggests that an<br />

<strong>in</strong>cremental construction may not be possible and one has to consider all possible <strong>in</strong>ner loops<br />

at the same time. Moreover, local shortest <strong>path</strong> cannot be f<strong>in</strong>e tuned to get the global <strong>path</strong>.<br />

For example, a shortest <strong>path</strong> between two <strong>in</strong>ner loops may not play a role at all <strong>in</strong> the global<br />

shortest <strong>path</strong> between S and E (even-though those two curves may contribute to the f<strong>in</strong>al<br />

<strong>path</strong>). Hence, all possible <strong>path</strong>s have to be detected to compute SIP.<br />

Lemma 3 <strong>in</strong>dicates the <strong>in</strong>teraction that a <strong>path</strong> can have and the cases for which the <strong>path</strong><br />

can be elim<strong>in</strong>ated, reduc<strong>in</strong>g the number of candidates and also computation of further BTs<br />

for identify<strong>in</strong>g SIP.<br />

Lemma 3 (Path Elim<strong>in</strong>ation): Let there be a <strong>path</strong>. Let there be extended PCTs from S or<br />

extended BTs consistent with the direction of traversal of the <strong>path</strong>. The <strong>path</strong> is elim<strong>in</strong>ated<br />

if it <strong>in</strong>tersects any extended PCT from S or extended BT orig<strong>in</strong>at<strong>in</strong>g from the same concave<br />

portion through which the <strong>path</strong> has passed.<br />

Proof Let Fi represent the start<strong>in</strong>g footpo<strong>in</strong>t of BTi. Let η consist of the PCT, concave<br />

portion between T and F1, and BT1 itself (refer to Figure 1(a)). Let the the bitangents BT2,<br />

and BT3 arise out of the same concave portion as that of BT1. Let EBT2 and EBT3 represent<br />

the <strong>in</strong>tersection po<strong>in</strong>t of a <strong>path</strong> with their respective extended BTs.<br />

Case 1: If η <strong>in</strong>tersects any extended PCT from S at some po<strong>in</strong>t, say X, then the portion of<br />

η till X can be replaced by the straight l<strong>in</strong>e portion SX which would make the <strong>path</strong> shorter<br />

and hence η cannot be a potential SIP.<br />

Case 2: Let the footpo<strong>in</strong>t of a bitangent lies between T and F1 (such as F2 of BT2). Let<br />

the <strong>path</strong> ζ = η + ζa and ζa <strong>in</strong>tersects extended BT2 at EBT2. Then the cumulative portion<br />

formed by concave portion of F2F1, BT1 and ζa can be replaced by straight l<strong>in</strong>e portion from<br />

F2 to EBT2 to get a shorter <strong>path</strong>. Hence ζ can be removed.<br />

Case 3a: Let the footpo<strong>in</strong>t of a BT lies outside of T and F1 (such as F3 of BT3). Let the<br />

<strong>path</strong> ζ = η + ζc. BT1 + ζc is longer than the <strong>path</strong> (F1F3 + F3 to EBT3) by the convex hull<br />

property. Hence ζ can be removed.<br />

Case 3b: Let the <strong>path</strong> ζ = η + ζb. The <strong>path</strong> ζ has self-<strong>in</strong>tersection and hence it can be<br />

elim<strong>in</strong>ated.<br />

Lemma 4 Let ζ be a <strong>path</strong> from S to E. Let G ∈ ζ be a po<strong>in</strong>t on a concave portion of one of<br />

the <strong>in</strong>put curves. Let SG and GE denote the portions of ζ before and after G respectively.<br />

4


S<br />

EBT3<br />

BT3<br />

T F2<br />

F3<br />

ζc<br />

ζb<br />

BT2<br />

BT1<br />

EBT2<br />

ζa<br />

(a) Barrier lemma (BTs from same concave region)<br />

Figure 1: Barrier lemma and region lemma<br />

S<br />

ζ<br />

G B<br />

(b) Generalized region lemma<br />

Consider SG, portions of an <strong>in</strong>put curves and an extended BT from the same concave portion<br />

<strong>in</strong> which G is present (or an extended PCT from S) as boundary components form<strong>in</strong>g a closed<br />

region, R. If R does not conta<strong>in</strong> E, then for ζ to be a SIP, no portion of ζ shall be conta<strong>in</strong>ed<br />

<strong>in</strong> R.<br />

Proof Proof is by contradiction. There exists a region R and some portion of GE is conta<strong>in</strong>ed<br />

<strong>in</strong> R. E does not belong to R and for ζ to reach E it has to cross the boundary of R. Thus<br />

ζ has to <strong>in</strong>tersect one of the boundary components of R. Consider<strong>in</strong>g each case separately,<br />

Case 1: ζ cutt<strong>in</strong>g a portion of an <strong>in</strong>put curve<br />

Cutt<strong>in</strong>g one of the <strong>in</strong>put curves would mean ζ is not completely conta<strong>in</strong>ed <strong>in</strong> the region<br />

specified by the set of curves.<br />

Case 2: ζ cutt<strong>in</strong>g a PCT or BT or ζ cutt<strong>in</strong>g SG<br />

This case can be proved by apply<strong>in</strong>g Lemma 3.<br />

Lemma 4, termed as generalized region lemma (GRL) (a generalized version of the region<br />

check lemma <strong>in</strong> [18]) helps <strong>in</strong> elim<strong>in</strong>at<strong>in</strong>g some of the <strong>in</strong>ner loops/PCTs/BTs by form<strong>in</strong>g<br />

closed regions. Figure 1(b) shows a closed region R formed from SGBIS. This lemma holds<br />

even if the roles of S and E are swapped.<br />

4 Algorithm<br />

Figure 2(a) shows a set of curves for which SIP has to be determ<strong>in</strong>ed between S and E (l<strong>in</strong>e<br />

SE is also shown). Let all curves except COC have clockwise orientation. Let S and E be the<br />

dist<strong>in</strong>ct po<strong>in</strong>ts on COC for which SIP has to be determ<strong>in</strong>ed (do note that this condition is for<br />

explanation purpose and can be relaxed, for example the outer boundary can be replaced with<br />

a bound<strong>in</strong>g box). Without loss of generality, let S be the po<strong>in</strong>t with lower parametric value<br />

of the two. Let CT G be the curve at which a PCT becomes tangent from an orig<strong>in</strong>at<strong>in</strong>g curve<br />

5<br />

R<br />

I<br />

E


E<br />

S<br />

(a) Sample set of curves (b) PCTs that are<br />

completely conta<strong>in</strong>ed <strong>in</strong><br />

MCD<br />

Figure 2: Sample set of curves and PCTs from S<br />

(the footpo<strong>in</strong>t denoted as T ). Let CF E denote the curve at which the extended PCT <strong>in</strong>tersects<br />

first, with the <strong>in</strong>tersection po<strong>in</strong>t denoted as IF E. Also, let IOC be the first <strong>in</strong>tersection of the<br />

PCT with the outer curve COC. It is to be noted that the extended PCT can <strong>in</strong>tersect the<br />

outer curve first and <strong>in</strong> that case, CF E = COC, and IF E = IOC.<br />

4.1 Process<strong>in</strong>g PCTs<br />

Initially, PCTs from S (us<strong>in</strong>g constra<strong>in</strong>t equation <strong>in</strong> [18]) are used as the start<strong>in</strong>g tangents.<br />

All the PCTs that are not completely conta<strong>in</strong>ed <strong>in</strong> the MCD are then removed (Figure 2(b)<br />

shows only PCTs that are completely conta<strong>in</strong>ed <strong>in</strong> the MCD). Consider<strong>in</strong>g the Figure 3(a),<br />

for the PCT ST1, the curve C1 is CT G which has the footpo<strong>in</strong>t T1. The extended PCT first<br />

<strong>in</strong>tersects at P1. Hence IF E = P1. S<strong>in</strong>ce P1 is at the outer curve COC, IF E = IOC = P1<br />

and CF E = COC. Note that T1P1 is completely conta<strong>in</strong>ed <strong>in</strong> the MCD. For the extended<br />

PCT whose first <strong>in</strong>tersection IF E = I3 with curve CF E = C3, CT G = COC. However, for the<br />

extended PCT whose first <strong>in</strong>tersection IF E = I4 with curve CF E = C3, CT G = C5. All the<br />

extended portions of the PCTs are identified by dashed l<strong>in</strong>es.<br />

4.1.1 Exterior region identification<br />

Among the PCTs that are completely conta<strong>in</strong>ed <strong>in</strong> MCD, a PCT with its footpo<strong>in</strong>t T or IF E<br />

ly<strong>in</strong>g on COC, the closest <strong>in</strong> clockwise direction along the curve COC to the end po<strong>in</strong>t, E, is<br />

selected. Though the search is done <strong>in</strong> clockwise direction, the closest po<strong>in</strong>t (for example,<br />

P3 <strong>in</strong> Figure 3(a)) is <strong>in</strong> the counter-clockwise portion between S and E, when travelled from<br />

S. Hence the PCT is named as CCRP CT (counter-clockwise region PCT). For a PCTs thus<br />

selected, the follow<strong>in</strong>g regions are described based on the conditions del<strong>in</strong>eated as follows.<br />

1. If CT G and CF E are both COC respectively, then two regions are identified. One region<br />

consist<strong>in</strong>g ST and portion of outer curve from T to S (that does not conta<strong>in</strong> E) as<br />

6<br />

S


I4<br />

C3<br />

I3<br />

P3<br />

P1<br />

C5<br />

C1<br />

T1<br />

(a) PCTs Extended to get first <strong>in</strong>tersection<br />

S<br />

I5<br />

(b) Regions R1 and R2 for elim<strong>in</strong>ation<br />

of PCTs/Inner curves<br />

Figure 3: Process<strong>in</strong>g PCTs us<strong>in</strong>g their extensions<br />

boundaries. The other by T IF E and the portion of outer curve (that does not conta<strong>in</strong><br />

E) from IF E to T as boundaries.<br />

2. If CT G is not COC and IF E is on COC, then the region is def<strong>in</strong>ed by the boundary curves<br />

SIF E and the portion of outer boundary (that does not conta<strong>in</strong> E) from IF E to S (<strong>in</strong><br />

Figure 3(b), region R1 with boundary SI5S).<br />

3. If CT G is COC and IF E not on COC, then the region is def<strong>in</strong>ed by the boundary curves<br />

ST and the portion of outer curve (that does not conta<strong>in</strong> E) from T to S . For e.g., <strong>in</strong><br />

Figure 3(b), region R2 def<strong>in</strong>ed by the closed boundary ST6S. It is to be noted that the<br />

first <strong>in</strong>tersection of ST6 is at I3 with the curve C3 (Figure 3(a)).<br />

A similar search is done <strong>in</strong> the counter-clockwise direction and CLRP CT (clockwise region<br />

PCT) is obta<strong>in</strong>ed. Also correspond<strong>in</strong>g regions are identified.<br />

4.1.2 Interior region identification<br />

Interior regions are formed when footpo<strong>in</strong>ts of PCTs and/or extended PCTs first <strong>in</strong>tersection<br />

po<strong>in</strong>ts are fall<strong>in</strong>g on the same curve, but not on COC. The curve portion between the mutually<br />

farthest po<strong>in</strong>ts on the curve and their respective PCT/extended PCT form a region. For<br />

example, <strong>in</strong> Figure 4(a), several extended PCTs (a different start<strong>in</strong>g po<strong>in</strong>t W for the PCTs<br />

is used for illustrative purpose) have IF E’s on the same curve CSM. The <strong>in</strong>terior region is<br />

formed by W I1I2W , where I1 and I2 are the mutually farthest po<strong>in</strong>ts along the curve CSM.<br />

In this particular case, I1 and I2 are the first <strong>in</strong>tersections of the extended PCTs of the curves<br />

C1 and C2 respectively.<br />

7<br />

R1<br />

T6<br />

T5<br />

R2<br />

S


C1<br />

I1<br />

I2<br />

CSM<br />

(a) An example of <strong>in</strong>terior<br />

region elim<strong>in</strong>ation<br />

C2<br />

W<br />

4.1.3 Region-based elim<strong>in</strong>ation<br />

E E<br />

(b) PCTs from S after elim<strong>in</strong>ation<br />

Figure 4: Valid PCTs from S, E and <strong>in</strong>terior region<br />

S<br />

(c) Term<strong>in</strong>ation list from E<br />

Once the regions are identified, all PCTs and curves that are conta<strong>in</strong>ed <strong>in</strong> the regions are<br />

elim<strong>in</strong>ated (Lemma 4). In order to get the PCTs with<strong>in</strong> the regions, the values counterclockwise<br />

angle with respect to the SE l<strong>in</strong>e or parameter values of IOC are used. S<strong>in</strong>ce the<br />

PCTs are from the same start<strong>in</strong>g po<strong>in</strong>t, the angle and the parameter of IOC correlate. Firstly<br />

a range of parametric values is identified us<strong>in</strong>g the PCTs that contribute to the identification<br />

of regions. Then tangents fall<strong>in</strong>g with<strong>in</strong> or outside the range are elim<strong>in</strong>ated accord<strong>in</strong>gly. For<br />

curve elim<strong>in</strong>ation with<strong>in</strong> a region, typical <strong>in</strong>tersection check followed by ray shoot<strong>in</strong>g is done.<br />

Figure 4(b) and 4(c) show the rema<strong>in</strong><strong>in</strong>g PCTs from S and E after employ<strong>in</strong>g region-based<br />

elim<strong>in</strong>ation. Inner loops that are elim<strong>in</strong>ated us<strong>in</strong>g exterior regions R1 and R2 are shown as<br />

gray <strong>in</strong> Figure 3(b). Algorithm 1 describes the pseudocode for obta<strong>in</strong><strong>in</strong>g PCTs and process<strong>in</strong>g<br />

them.<br />

4.2 Process<strong>in</strong>g BTs<br />

BTs are computed from each PCT <strong>in</strong> the start<strong>in</strong>g list (which conta<strong>in</strong>s thus far processed<br />

PCTs, Figure 4(b)). A similar region elim<strong>in</strong>ation strategy is followed for BTs with some<br />

modifications to the region identification. Consider a <strong>path</strong> ζ, shown <strong>in</strong> Figure 5(a) from S<br />

to a po<strong>in</strong>t T on a curve CT G, which is an <strong>in</strong>complete potential SIP (i.e., the <strong>path</strong> has not<br />

yet reached the end po<strong>in</strong>t E). At and near T , CT G is concave. Let φ (clockwise or counterclockwise)<br />

be the direction <strong>in</strong>duced by ζ on CT G. Let NIF be the closest <strong>in</strong>flection po<strong>in</strong>t to<br />

T on CT G <strong>in</strong> the direction φ. Now T and NIF identify a concave portion of CT G.<br />

To identify the next set of potential <strong>path</strong>s for ζ, the set of bitangents from concave portion<br />

T NIF is computed. The bitangents that are not completely conta<strong>in</strong>ed <strong>in</strong> MCD and those that<br />

are not consistent with direction φ are removed. Let the start<strong>in</strong>g foot po<strong>in</strong>t of each bitangent<br />

be denoted by FST . The start<strong>in</strong>g curve, CST , for all bitangents is CT G. Let the end foot po<strong>in</strong>t<br />

and correspond<strong>in</strong>g end curve be denoted by FEN and CEN. Each bitangent is extended from<br />

8


IF E<br />

FEN<br />

FST<br />

T5<br />

R1<br />

(a) Region R1 us<strong>in</strong>g<br />

ST5FST FENIF ES as its boundary<br />

ζ<br />

S<br />

Figure 5: Regions us<strong>in</strong>g BTs<br />

R2<br />

(b) Region R2 formed us<strong>in</strong>g BTs<br />

FEN opposite to FST to get the first <strong>in</strong>tersection po<strong>in</strong>t, IOC, with the outer boundary COC.<br />

Similar to PCT case, the first po<strong>in</strong>t of <strong>in</strong>tersection of the extended BT (i.e. BTs from FEN)<br />

with <strong>in</strong>put curves, is obta<strong>in</strong>ed as IF E on the curve CF E.<br />

4.2.1 Region identification and elim<strong>in</strong>ation of BTs<br />

As <strong>in</strong> the case of PCT, region boundaries are identified. Assum<strong>in</strong>g, for a BT, IF E was on<br />

the curve COC. An exterior region is formed by ζ (ST5), concave portion T5FST , bitangent<br />

FST FEN, extended BT FENIF E and the portion of the outer curve between IF E and S that<br />

does not conta<strong>in</strong> E (region R1 <strong>in</strong> Figure 5(a)). Other cases for exterior region identification<br />

are delegated similar to that of PCTs (another example of exterior region R2 is shown <strong>in</strong><br />

Figure 5(b)).<br />

For the PCTs, start<strong>in</strong>g or end<strong>in</strong>g po<strong>in</strong>t is available to compute <strong>in</strong>terior regions. In the<br />

case of BTs, <strong>in</strong>stead of a start<strong>in</strong>g po<strong>in</strong>t, a concave portion (such as T5FST ) plays this role.<br />

Identification of <strong>in</strong>terior regions is then similar to that of the PCTs (i.e. f<strong>in</strong>d<strong>in</strong>g farthest<br />

tangents ly<strong>in</strong>g on the same curve). Us<strong>in</strong>g the <strong>in</strong>terior and exterior regions, BTs and curves<br />

fall<strong>in</strong>g <strong>in</strong> them are elim<strong>in</strong>ated. This process is done recursively for all BTs further computed.<br />

Along the recursion, a tree of <strong>path</strong>s is ma<strong>in</strong>ta<strong>in</strong>ed.<br />

4.2.2 Process<strong>in</strong>g BTs from S and E<br />

If S is <strong>in</strong> a convex portion, then no BT from the portion is completely conta<strong>in</strong>ed. If S is<br />

<strong>in</strong> a concave portion and CLRP CT as mentioned <strong>in</strong> 4.1.1 exists, then all BTs <strong>in</strong> clockwise<br />

direction from the concave portion conta<strong>in</strong><strong>in</strong>g S have their start<strong>in</strong>g foot po<strong>in</strong>t FST <strong>in</strong> the<br />

region identified by CLRP CT . If CLRP CT does not exist, then BTs <strong>in</strong> clockwise direction<br />

from the concave portion conta<strong>in</strong><strong>in</strong>g S are to be obta<strong>in</strong>ed and further processed accord<strong>in</strong>g to<br />

9


(a) Rejected <strong>path</strong> (<strong>in</strong><br />

blue)<br />

(b) Rejected <strong>path</strong> (<strong>in</strong><br />

blue)<br />

BT1<br />

ζ2<br />

ζ1<br />

(c) ζ1 conta<strong>in</strong>s BT1<br />

Figure 6: Rejected and merged <strong>path</strong>s (<strong>in</strong> blue)<br />

(d) Merged <strong>path</strong>s<br />

section 4.2. To do this, a dummy tangent l<strong>in</strong>e start<strong>in</strong>g at S <strong>in</strong> the direction φ as clockwise<br />

is added to the BT process<strong>in</strong>g algorithm. Similar procedure is followed for counter-clockwise<br />

direction and for the end po<strong>in</strong>t E.<br />

4.3 Further elim<strong>in</strong>ation of <strong>path</strong>s<br />

Sections 4.1 and 4.2 detailed how the PCTs/BTs can be elim<strong>in</strong>ated based on the region<br />

formulation us<strong>in</strong>g Lemma 4. However, there are further elim<strong>in</strong>ation of PCTs/BTs is possible.<br />

This is done through the application of Lemma 3 which stated that a <strong>path</strong> cannot <strong>in</strong>tersect<br />

certa<strong>in</strong> PCTs/BTs <strong>in</strong> specific ways. Thus a check is made to elim<strong>in</strong>ate <strong>path</strong>s that are not<br />

valid. Figures 6(a) and 6(b) show the <strong>path</strong> <strong>in</strong> blue that can be elim<strong>in</strong>ated us<strong>in</strong>g Lemma 3.<br />

4.4 Merg<strong>in</strong>g of <strong>path</strong>s<br />

A tree structure is ma<strong>in</strong>ta<strong>in</strong>ed to store the computed <strong>path</strong>s thus far. The tree starts with a<br />

s<strong>in</strong>gle node S, and the children for each node is the list of valid tangents obta<strong>in</strong>ed us<strong>in</strong>g the<br />

node. The procedure processes every child recursively till E is reached via. the term<strong>in</strong>ation<br />

list (which conta<strong>in</strong>s the PCTs processed from E) or no further valid tangent is available.<br />

Along with every node, the length from S up to that node is also stored by comput<strong>in</strong>g the<br />

Euclidean distance for tangents and l<strong>in</strong>e <strong>in</strong>tegral for <strong>curved</strong> portions. Thus the length of leaf<br />

node when it reaches E will be the length of that particular <strong>path</strong>.<br />

While the above procedures are followed recursively, a merg<strong>in</strong>g step is performed to avoid<br />

redundant computations. Simply, <strong>path</strong>s are merged if a bitanget to be processed has been<br />

already traversed. In this case all subtree of <strong>path</strong>s already computed is added to the current<br />

<strong>path</strong>. The length correspond<strong>in</strong>g to each node is updated accord<strong>in</strong>gly. An example of merg<strong>in</strong>g<br />

is shown <strong>in</strong> Figures 6(c) and 6(d). In Figure 6(c), the bitangent BT1 is already traversed by<br />

the <strong>path</strong> ζ1 and hence the <strong>path</strong> ζ2 is merged when BT1 is reached. Algorithm 2 (<strong>in</strong> appendix)<br />

gives the pseudocode for process<strong>in</strong>g the bitangents.<br />

10


4.5 Term<strong>in</strong>ation of a <strong>path</strong><br />

In the case of SCD, the algorithm term<strong>in</strong>ates, when the latest footpo<strong>in</strong>t of the PCT/BT<br />

of the SIP algorithm thus far and the footpo<strong>in</strong>t of the PCT from E lie on a same concave<br />

portion. However, as the SIP is not unique <strong>in</strong> MCD, a similar check is used to compute only<br />

the term<strong>in</strong>ation of a <strong>path</strong>. For completeness, the follow<strong>in</strong>g corollary (Corollary 1) from [18]<br />

has been modified for a <strong>path</strong> term<strong>in</strong>ation.<br />

Corollary 1 Let CP1 be the latest footpo<strong>in</strong>t of the PCT/BT, which will lie <strong>in</strong> a concave<br />

portion of the curve of the SIP algorithm thus far. Let CP2 be the footpo<strong>in</strong>t of the PCT from<br />

E. If CP1 and CP2 lie on a same concave portion, then the <strong>path</strong> is term<strong>in</strong>ated.<br />

The algorithm term<strong>in</strong>ates when Corollary 1 is satisfied for all the <strong>path</strong>. SIP is then<br />

computed us<strong>in</strong>g the <strong>in</strong>tegration of each <strong>path</strong> and identify<strong>in</strong>g the least of them. Algorithm 3<br />

gives the pseudo-code for comput<strong>in</strong>g the shortest <strong>in</strong>terior <strong>path</strong>, given two po<strong>in</strong>ts S and E on<br />

the set of curves CurveList (please note that the pseudocode does not <strong>in</strong>clude handl<strong>in</strong>g C 1<br />

discont<strong>in</strong>uities).<br />

5 Results and Discussion<br />

Fig. 7 show the implementation results for a few test examples, with all potential SIPs (<strong>in</strong><br />

blue) and SIP (<strong>in</strong> black) and green <strong>in</strong>dicat<strong>in</strong>g the boundaries (outer and <strong>in</strong>ner curves) form<strong>in</strong>g<br />

MCD with different start and end po<strong>in</strong>ts. Implementation <strong>in</strong> this paper have been carried out<br />

us<strong>in</strong>g IRIT [8], a solid model<strong>in</strong>g kernel. The constra<strong>in</strong>t equations for PCT and BT were solved<br />

us<strong>in</strong>g the geometric constra<strong>in</strong>t solver [9] <strong>in</strong> IRIT. The algorithm does not limit the number of<br />

holes that can be present <strong>in</strong> the MCD. Also, local spiral-shapes such as the one <strong>in</strong> Fig. 7(p) are<br />

supported. As the algorithm generates all potential SIPs (for eg., all blue <strong>path</strong>s <strong>in</strong> Fig. 7(a)),<br />

it has the potential to give all <strong>path</strong> of approximately equal lengths (with<strong>in</strong> a tolerance level,<br />

specified by the user). Moreover, us<strong>in</strong>g generalized lemma (Lemma 4) elim<strong>in</strong>ates <strong>in</strong>ner loops<br />

effectively reduc<strong>in</strong>g the number of curves <strong>in</strong>volved <strong>in</strong> the computation of BTs and <strong>in</strong>flection<br />

po<strong>in</strong>ts. Fig. 7(o) shows an example where SIP did not pass through any of the <strong>in</strong>ner loops.<br />

For the <strong>in</strong>put po<strong>in</strong>ts S and E not on the outer boundary, a bound<strong>in</strong>g box has been employed<br />

to identify regions for elim<strong>in</strong>at<strong>in</strong>g curves and tangents (PCTs/BTs). Figure 8 shows a few<br />

results with outer boundary replaced by a box.<br />

5.1 Handl<strong>in</strong>g C 1 discont<strong>in</strong>uities<br />

Po<strong>in</strong>ts of C 1 discont<strong>in</strong>uity on the curves are identified [15]. From these po<strong>in</strong>ts and the other<br />

curves, PCTs are obta<strong>in</strong>ed and processed (as described <strong>in</strong> Section 4.1). L<strong>in</strong>es between C 1<br />

discont<strong>in</strong>uity po<strong>in</strong>ts are considered as pseudo-Bitangents (pBTs). Initially, pBTs that cuts<br />

across the MCD <strong>in</strong> the neighbourhood of its C 1 discont<strong>in</strong>uity po<strong>in</strong>ts are removed. Other<br />

process<strong>in</strong>g are done similar to that of BTs. Figure 9 shows a few test results for SIP with<br />

curves hav<strong>in</strong>g C 1 discont<strong>in</strong>uities.<br />

11


(a) All potential SIPs (b) SIP (c) All potential SIPs (d) SIP<br />

(e) All potential SIPs (f) SIP (g) All potential SIPs (h) SIP<br />

(i) All potential SIPs (j) SIP (k) All potential SIPs (l) SIP<br />

(m) All potential<br />

SIPs<br />

(n) SIP (o) SIP (p) SIP<br />

Figure 7: Test results of the algorithm show<strong>in</strong>g 12all<br />

potential shortest <strong>path</strong>s (<strong>in</strong> blue) and SIP<br />

(<strong>in</strong> black).


(a) All potential SIPs (b) SIP (c) All potential SIPs (d) SIP<br />

(e) All potential SIPs (f) SIP (g) All potential SIPs (h) SIP<br />

Figure 8: All potential shortest <strong>path</strong>s (<strong>in</strong> blue) and SIP (<strong>in</strong> black) for outer boundary as a<br />

bound<strong>in</strong>g box.<br />

5.2 Discussion<br />

To the best of the knowledge of the authors, not much work has been done on MCD. Ref.<br />

2 <strong>in</strong> [3], which appear to be related to MCD is not accessible. [3, 10] seem to have handled<br />

only SCD. However, both are theoretical <strong>in</strong> nature and no implementation result have been<br />

provided. As the SIP is not unique <strong>in</strong> MCD, the algorithm has to be tuned to handle holes.<br />

The MCD can be considered some what similar to the calculation of <strong>path</strong> from start to<br />

end po<strong>in</strong>t through obstacles (i.e. a doma<strong>in</strong> without the outer boundary <strong>in</strong> MCD). Most of<br />

the algorithms related to SIP of obstacles handle polygonal boundaries, <strong>in</strong>clud<strong>in</strong>g a distance<br />

function approach [20]. For <strong>curved</strong> obstacles, [16] proposed the computation of visibility<br />

graph, assum<strong>in</strong>g the obstacles as convex curves. For disk obstacles, shortest <strong>path</strong> based on<br />

visibility graph and Dijkstra was proposed <strong>in</strong> [4]. Approach <strong>in</strong> [6] seems to be based on<br />

Voronoi diagram and it is well known that computation of the diagram is very difficult and<br />

not robust for arbitrary shaped curves. All the algorithms for <strong>curved</strong> obstacles appear to be<br />

theoretical <strong>in</strong> nature and no implementation results have been provided (<strong>in</strong> [17], an approach<br />

us<strong>in</strong>g grid-based approximation has been described used fast-sweep<strong>in</strong>g method <strong>in</strong> [22]).<br />

To use an algorithm such as Dijsktra for <strong>curved</strong> obstacles, visibility graph of the <strong>curved</strong> obstacles<br />

can be used. However, to compute the visibility graph, the footpo<strong>in</strong>ts of the PCTs/BTs<br />

are required. In our work, while traversal of the algorithm, all the potential <strong>path</strong>s are identified<br />

and hence the application of visibility graph and Dijkstra need not be computed.<br />

13


(a) All potential SIPs (b) SIP (c) All potential SIPs (d) SIP<br />

(e) SIP (f) SIP<br />

Figure 9: All potential shortest <strong>path</strong>s (<strong>in</strong> blue) and SIP (<strong>in</strong> black) for curves hav<strong>in</strong>g C 1<br />

discont<strong>in</strong>uities.<br />

5.2.1 Complexity of the algorithm<br />

In this paper, as the computation of SIP <strong>in</strong>volves PCTs/BTs, the complexity is analyzed<br />

based on the number of PCTs/BTs that may be <strong>in</strong>volved (the analysis does not take <strong>in</strong>to<br />

C 1 discont<strong>in</strong>uity po<strong>in</strong>ts). Let n be the number of concave portions from the outer boundary<br />

and h be the number of <strong>in</strong>ner loops. Between two concave regions there can be at most<br />

four completely conta<strong>in</strong>ed BTs (this can be shown by employ<strong>in</strong>g the convex hull between<br />

two curves). Thus maximum number of BTs for the outer boundary will be 4(nC2) (nC2 =<br />

n(n − 1)/2). For h <strong>in</strong>ner loops, number of BTs is 4(hC2) and between <strong>in</strong>ner and outer<br />

boundary, it will be 4nh. From the start<strong>in</strong>g po<strong>in</strong>t S, there can be at most two completely<br />

conta<strong>in</strong>ed PCTs for a concave portion. This implies that at most 2n PCTs from S and 2n<br />

PCTs from E will be available when n concave portions are considered. Similarly 2h from S<br />

and 2h from E will be the number of PCTs for the <strong>in</strong>ner loops. Let T = 4(nC2 + nh + n + h)<br />

be the total number of tangents (PCTs + BTs).<br />

Tangent lists are searched for the closest tangents (to E or S) as <strong>in</strong> discussed <strong>in</strong> section<br />

4.1.1 and for mutually farthest tangents as <strong>in</strong> section 4.1.2. No tangent is processed twice<br />

because of merg<strong>in</strong>g criteria followed <strong>in</strong> section 4.4. Thus the complexity of the algorithm is<br />

O(T ) <strong>in</strong> the worst case.<br />

In general, not all BTs will be used for our computation (as <strong>in</strong>ner loops may be elim<strong>in</strong>ated)<br />

14


(a) All BTs <strong>in</strong> the given<br />

shape (568 BTs)<br />

(b) Completely conta<strong>in</strong>ed<br />

BTs (183 BTs)<br />

Figure 10: Number of bitangents<br />

though it cannot be quantified exactly how many tangents will be removed as it depends on<br />

the shape of the curves. The number of BTs that will be used will be a substantial reduction<br />

of the total number of BTs, when we compute on the fly over any algorithm that might use<br />

all the completely conta<strong>in</strong>ed tangents. Consider the <strong>in</strong>put curves <strong>in</strong> Figure 7(a). The curves<br />

have 568 BTs (Figure10(a)) and 183 completely conta<strong>in</strong>ed BTs (Figure10(b)). By <strong>in</strong>clud<strong>in</strong>g<br />

the PCTs, approximately there are 200 completely conta<strong>in</strong>ed tangents. These are the <strong>in</strong>put<br />

for graph based Dijkstra’s algorithm. However, our algorithm has been found to use far<br />

lesser number of tangents as shown <strong>in</strong> the Table 1. The table shows the number of tangents<br />

selected/number conta<strong>in</strong>ed tangents at each stage along the recursion. Blank entry <strong>in</strong> the<br />

table means all <strong>path</strong>s have term<strong>in</strong>ated.<br />

Table 1: Number of tangents selected/Number conta<strong>in</strong>ed tangents at each stage<br />

Figure PCTs from E PCTs from S BTs BTs BTs BTs BTs BTs BTs<br />

7(a) 4/11 5/12 2/8 1/10 1/6 1/12<br />

7(c) 3/3 4/10 1/12 2/4 1/10 1/16 2/3 2/12 1/6<br />

7(e) 3/14 6/10 3/11 2/12 1/15 2/16 1/12 1/12<br />

It should be noted that application of Lemma 4 leads to <strong>in</strong>ner loops and regions get<br />

rejected at each stage, BTs are computed and used only <strong>in</strong> a closed band around the shortest<br />

<strong>path</strong> as could be seen from figures 7(a) and 7(e). Thus the number of computations are also<br />

greatly reduced.<br />

5.2.2 Us<strong>in</strong>g discretization of the curve to compute SIP<br />

Discretiz<strong>in</strong>g the curve <strong>in</strong>to set of po<strong>in</strong>ts or polyl<strong>in</strong>es and then employ<strong>in</strong>g Dijkstra’s algorithm<br />

could be another approach to compute SIP. However, to compute a <strong>path</strong>, it is imperative that<br />

the footpo<strong>in</strong>ts of the tangent (PCTs/BTs) were part of sample po<strong>in</strong>ts or vertices of polyl<strong>in</strong>es.<br />

However, there is no effective sampl<strong>in</strong>g strategy that can precisely capture all footpo<strong>in</strong>ts of<br />

tangents and bitangents and hence more <strong>in</strong>accuracies are <strong>in</strong>troduced. As one has to anyway<br />

15


compute the tangency po<strong>in</strong>ts to use an algorithm like Dijkstra, which will be of O(T 2 ), the<br />

complexity of our algorithm is O(T ). Also, it is worth not<strong>in</strong>g that the algorithm directly<br />

computes all the potential <strong>path</strong> on the fly.<br />

6 Conclusion<br />

In this paper, an algorithm to compute SIP of <strong>curved</strong> boundaries, form<strong>in</strong>g a <strong>multiply</strong><strong>connected</strong><br />

doma<strong>in</strong>, extend<strong>in</strong>g the algorithm <strong>in</strong> [18] has been presented. It is shown that all<br />

potential <strong>path</strong>s can be computed, elim<strong>in</strong>at<strong>in</strong>g many PCTs/BTs/<strong>in</strong>ner loops us<strong>in</strong>g a generalized<br />

region lemma and then specifically f<strong>in</strong>d<strong>in</strong>g exterior and <strong>in</strong>terior regions us<strong>in</strong>g PCTs/BTs.<br />

Merg<strong>in</strong>g of <strong>path</strong>s that will avoid redundant computation is also done. It is also shown that the<br />

algorithm can be applied to any number of holes and also to curves hav<strong>in</strong>g C 1 discont<strong>in</strong>uity<br />

po<strong>in</strong>ts. Test results on a few cases <strong>in</strong>dicate that the algorithm is very amenable to implementation.<br />

SIP can be computed without employ<strong>in</strong>g visibility graph and Dijkstra. Further work<br />

<strong>in</strong>volves focuss<strong>in</strong>g on applications based on [18] and this paper.<br />

References<br />

[1] Alfred V. Aho, John E. Hopcroft, and Jeffrey D. Ullman. Data Structures and Algorithms.<br />

Addison-Wesley, 1983.<br />

[2] H. Alt and E. Welzl. Visibility graphs and obstacle-avoid<strong>in</strong>g shortest <strong>path</strong>s. Mathematical<br />

Methods of Operations Research, 32:145–164, 1988. 10.1007/BF01928918.<br />

[3] Richard D. Bourg<strong>in</strong> and Sally E. Howe. <strong>Shortest</strong> curves <strong>in</strong> planar regions with <strong>curved</strong><br />

boundary. Theoretical Computer Science, 112(2):215 – 253, 1993.<br />

[4] Ee-Chien Chang, Sung Woo Choi, DoYong Kwon, Hyungju Park, and Chee K. Yap.<br />

<strong>Shortest</strong> <strong>path</strong> amidst disc obstacles is computable. In Proceed<strong>in</strong>gs of the twenty-first<br />

annual symposium on Computational geometry, SCG ’05, pages 116–125, New York,<br />

NY, USA, 2005. ACM.<br />

[5] Danny Z. Chen and Haitao Wang. Comput<strong>in</strong>g shortest <strong>path</strong>s amid pseudodisks. In Proceed<strong>in</strong>gs<br />

of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms,<br />

SODA ’11, pages 309–326. SIAM, 2011.<br />

[6] Danny Z. Chen and Haitao Wang. A nearly optimal algorithm for f<strong>in</strong>d<strong>in</strong>g L1-shortest<br />

<strong>path</strong>s among polygonal obstacles <strong>in</strong> the plane. In Proceed<strong>in</strong>gs of the 19th European<br />

conference on Algorithms, ESA’11, pages 481–492, Berl<strong>in</strong>, Heidelberg, 2011. Spr<strong>in</strong>ger-<br />

Verlag.<br />

[7] David P. Dobk<strong>in</strong> and Diane L. Souva<strong>in</strong>e. Computational geometry <strong>in</strong> a <strong>curved</strong> world.<br />

Algorithmica, 5(1-4):421–457, 1988.<br />

[8] Gershon Elber. IRIT 10.0 User’s Manual. The Technion—IIT, Haifa, Israel, 2009.<br />

16


[9] Gershon Elber and Myung-Soo Kim. Geometric constra<strong>in</strong>t solver us<strong>in</strong>g multivariate<br />

rational spl<strong>in</strong>e functions. In Proceed<strong>in</strong>gs of the sixth ACM symposium on Solid model<strong>in</strong>g<br />

and applications, SMA ’01, pages 1–10, New York, NY, USA, 2001. ACM.<br />

[10] P Fabel. ”shortest” arcs <strong>in</strong> closed planar disks vary cont<strong>in</strong>uously with the boundary.<br />

Topology and its Applications, 95:75–83(9), 23 June 1999.<br />

[11] D. T. Lee and F. P. Preparata. Euclidean shortest <strong>path</strong>s <strong>in</strong> the presence of rectil<strong>in</strong>ear<br />

barriers. Networks, 14(3):393–410, 1984.<br />

[12] Haib<strong>in</strong> L<strong>in</strong>g and David W. Jacobs. Shape classification us<strong>in</strong>g the <strong>in</strong>ner-distance. IEEE<br />

Trans. Pattern Anal. Mach. Intell., 29(2):286–299, 2007.<br />

[13] Elefterios A. Melissaratos and Diane L. Souva<strong>in</strong>e. <strong>Shortest</strong> <strong>path</strong>s help solve geometric<br />

optimization problems <strong>in</strong> planar regions. SIAM J. Comput., 21(4):601–638, 1992.<br />

[14] Joseph S. B. Mitchell. <strong>Shortest</strong> <strong>path</strong>s among obstacles <strong>in</strong> the plane. In Proceed<strong>in</strong>gs of<br />

the n<strong>in</strong>th annual symposium on Computational geometry, SCG ’93, pages 308–317, New<br />

York, NY, USA, 1993. ACM.<br />

[15] Les Piegl and Wayne Tiller. The NURBS book (2nd ed.). Spr<strong>in</strong>ger-Verlag New York,<br />

Inc., New York, NY, USA, 1997.<br />

[16] Michel Pocchiola and Gert Vegter. Comput<strong>in</strong>g the visibility graph via pseudotriangulations.<br />

In Proceed<strong>in</strong>gs of the eleventh annual symposium on Computational geometry,<br />

SCG ’95, pages 248–257, New York, NY, USA, 1995. ACM.<br />

[17] H Pottmann, M Hofer, T Ste<strong>in</strong>er, and W Wang. Industrial geometry: recent advances<br />

and applications <strong>in</strong> cad. Computer-Aided Design, 37(7):751–766, 2005.<br />

[18] S. Bharath Ram and M. Ramanathan. The shortest <strong>path</strong> <strong>in</strong> a simply-<strong>connected</strong> doma<strong>in</strong><br />

hav<strong>in</strong>g a <strong>curved</strong> boundary. Computer-Aided Design, 43(8):923–933, 2011.<br />

[19] James A. Storer and John H. Reif. <strong>Shortest</strong> <strong>path</strong>s <strong>in</strong> the plane with polygonal obstacles.<br />

J. ACM, 41:982–1012, September 1994.<br />

[20] Yen-hsi Richard Tsai. Rapid and accurate computation of the distance function us<strong>in</strong>g<br />

grids. J. Comput. Phys., 178(1):175–195, May 2002.<br />

[21] Franz-Erich Wolter. Cut loci <strong>in</strong> bordered and unbordered Riemannian manifolds. PhD<br />

thesis, Technical University of Berl<strong>in</strong>, Department of Mathematics, Germany, December<br />

1985.<br />

[22] H. Zhao. A fast sweep<strong>in</strong>g method for eikonal equations. Mathematics of Computation,<br />

74:603–627, 2005.<br />

17


7 Appendix: Pseudocode of the algorithms<br />

Algorithm 1 GetP CT s(X,CurveList)<br />

1: Get all PCTs from X to members <strong>in</strong> CurveList<br />

2: Elim<strong>in</strong>ate PCTs that are not completely conta<strong>in</strong>ed <strong>in</strong> the MCD and store it <strong>in</strong> P CT List<br />

3: Elim<strong>in</strong>ate curves and PCTs us<strong>in</strong>g exterior and <strong>in</strong>terior region identification.<br />

4: return T angentList,CurveList<br />

Algorithm 2 GetBT s(T gtL<strong>in</strong>e,CurveList,P resentP ath,T erm<strong>in</strong>ationList)<br />

1: [SearchCurve,SearchP ar,Dir] = T gtL<strong>in</strong>e.[EndCurve, EndP ar, Dir]<br />

2: if T gtL<strong>in</strong>e not elim<strong>in</strong>ated accord<strong>in</strong>g to section 4.3 then<br />

3: if T gtL<strong>in</strong>e is merged with a processed tangent,P rocessedT angent then<br />

4: Add the subtree of <strong>path</strong>s under P rocessedT angent and update <strong>path</strong> lengths<br />

5: else<br />

6: NextInflection= Identify next <strong>in</strong>flection po<strong>in</strong>t<br />

7: for Each Curve <strong>in</strong> CurveList do<br />

8: BT List= Get all BTs between SearchCurve and Curve<br />

9: Identify BTs hav<strong>in</strong>g StartP ar between SearchP ar and NextInflection<br />

10: Elim<strong>in</strong>ate BTs that are not consistent with the direction Dir accord<strong>in</strong>g to lemma2<br />

11: Elim<strong>in</strong>ate BTs that are not completely conta<strong>in</strong>ed <strong>in</strong> the MCD<br />

12: end for<br />

13: (NextT gtList,CurveList) = Rema<strong>in</strong><strong>in</strong>g BTs and Curves after elim<strong>in</strong>ation us<strong>in</strong>g exterior<br />

and <strong>in</strong>terior region identification.<br />

14: for Each T gtL<strong>in</strong>e <strong>in</strong> NextT gtList do<br />

15: P resentP ath += Concave portion + T gtL<strong>in</strong>e<br />

16: T ermCheck = Check for term<strong>in</strong>ation with tangents from T erm<strong>in</strong>ationList<br />

17: if T ermCheck == false then<br />

18: (NextBT List, CurveList) = GetBT s(T gtL<strong>in</strong>e,CurveList,P resentP ath,<br />

T erm<strong>in</strong>ationList)<br />

19: else<br />

20: P resentP ath += Concave portion + Corres. tgt. <strong>in</strong> T erm<strong>in</strong>ationList<br />

21: Add P resentP ath to <strong>Shortest</strong>P athList<br />

22: end if<br />

23: end for<br />

24: end if<br />

25: end if<br />

18


Algorithm 3 <strong>Shortest</strong>InteriorP ath(S,E,CurveList)<br />

1: if S and E are dist<strong>in</strong>ct then<br />

2: if Straight l<strong>in</strong>e <strong>path</strong> SE not available then<br />

3: (T erm<strong>in</strong>ationList, CurveList) = GetP CT s(E,CurveList)<br />

4: Add dummy tangent T erm<strong>in</strong>ationList if required accord<strong>in</strong>g to section 4.2.2<br />

5: (NextT gtList,CurveList) = GetP CT s(S,CurveList)<br />

6: Add dummy tangent to NextT gtList if required accord<strong>in</strong>g to section 4.2.2<br />

7: for Each T angentL<strong>in</strong>e <strong>in</strong> NextT gtList do<br />

8: P resentP ath=T angentL<strong>in</strong>e<br />

9: T ermCheck = Check for term<strong>in</strong>ation with tangents from T erm<strong>in</strong>ationList<br />

10: if T ermCheck == false then<br />

11: (NextBT List, CurveList) = GetBT s(T angentL<strong>in</strong>e,<br />

CurveList,P resentP ath,T erm<strong>in</strong>ationList)<br />

12: else<br />

13: P resentP ath += Concave portion + Corres. tgt. <strong>in</strong> T erm<strong>in</strong>ationList<br />

14: Add P resentP ath to <strong>Shortest</strong>P athList<br />

15: end if<br />

16: end for<br />

17: To get SIP, Compute all <strong>path</strong> lengths and f<strong>in</strong>d the m<strong>in</strong>imum.<br />

18: else<br />

19: Add SE to SIP.<br />

20: end if<br />

21: return SIP<br />

22: else<br />

23: return The start and the end po<strong>in</strong>ts are same.<br />

24: end if<br />

19


S. Bharath Ram is currently a research scholar <strong>in</strong> the Department of Eng<strong>in</strong>eer<strong>in</strong>g Design, Indian Institute<br />

of Technology Madras, Chennai, India. He earned a BE degree <strong>in</strong> Mechanical Eng<strong>in</strong>eer<strong>in</strong>g from College<br />

of Eng<strong>in</strong>eer<strong>in</strong>g, Gu<strong>in</strong>dy, Anna University, India. His current research <strong>in</strong>terests <strong>in</strong>clude geometric model<strong>in</strong>g,<br />

differential and computational geometry.<br />

M. Ramanathan is currently an Assistant Professor <strong>in</strong> the Department of Eng<strong>in</strong>eer<strong>in</strong>g Design, Indian<br />

Institute of Technology, Madras. He earned a B.E. degree <strong>in</strong> Mechanical Eng<strong>in</strong>eer<strong>in</strong>g from Thiagarajar<br />

college of Eng<strong>in</strong>eer<strong>in</strong>g, Madurai, India. He received his M. Sc. (Engg.) and Ph.D. from the Department<br />

of Mechanical Eng<strong>in</strong>eer<strong>in</strong>g at the Indian Institute of Science, Bangalore, India. He did his post-doctoral<br />

research at Technion, Haifa, Israel and then at Purdue university, USA. His current research <strong>in</strong>terests <strong>in</strong>clude<br />

geometric model<strong>in</strong>g, computational geometry, shape and image search, mesh model analysis, and BioCAD.<br />

1


Research Highlights<br />

• This paper computes shortest <strong>path</strong> for <strong>multiply</strong>-<strong>connected</strong> <strong>curved</strong> boundaries.<br />

• The algorithm does not discretize the boundaries <strong>in</strong>to po<strong>in</strong>ts or polyl<strong>in</strong>es.<br />

• No need to employ visibility graph to compute the shortest <strong>path</strong>.<br />

• The algorithm can handle C 1 discont<strong>in</strong>uities.<br />

• Start and end po<strong>in</strong>ts need not be on the outer boundary.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!