<%BANNER%>

Linear Programming Approach to Fitting Splines through 3D Channels


PAGE 1

LINEAR PR OGRAMMING APPR O A CH T O FITTING SPLINES THR OUGH 3D CHANNELS By ASHISH MYLES A THESIS PRESENTED T O THE GRADU A TE SCHOOL OF THE UNIVERSITY OF FLORID A IN P AR TIAL FULFILLMENT OF THE REQ UIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE UNIVERSITY OF FLORID A 2004

PAGE 2

Cop yright 2004 by Ashish Myles

PAGE 3

A CKNO WLEDGMENTS This research w as supported by NSF Grant CCR-9901894 at the Uni v ersity of Florida. Xiaobin W u contrib uted the slef e tab ulations [19]. iii

PAGE 4

T ABLE OF CONTENTS pageA CKNO WLEDGMENTS. . . . . . . . . . . . . . . . iiiLIST OF FIGURES. . . . . . . . . . . . . . . . . . vABSTRA CT. . . . . . . . . . . . . . . . . . . . vi 1INTRODUCTION ................................1 2BOUNDINGCONSTRUCTSANDRELATEDWORK .............6 3MODELINGTHEPROBLEM ..........................8 3.1ChannelDenition ............................8 3.2SplineDenition .............................9 3.3 Slefe Denition ..............................9 3.4SleeveDenition .............................11 3.5CorrespondenceoftheChannelandtheSplineEnclosure ........12 4THECONSTRAINTSYSTEM ..........................14 4.1Min-MaxSelection ............................14 4.2CorrespondenceandSmoothness .....................15 4.3InterferenceChecks ............................16 5THEOBJECTIVEFUNCTION .........................19 6PLANARCHANNELSANDPARALLELCURVES ..............20 7EXAMPLES ...................................22 8SUMMARY ....................................24 REFERENCES .....................................26 BIOGRAPHICALSKETCH ..............................28 iv

PAGE 5

LIST OF FIGURES Figure page1 Channel problem. . . . . . . . . . . . . . . . 11 A nai v e approach to the channel problem. . . . . . . . . 31 The basic idea of our solution to the Channel problem. . . . . . 42 Enclosures based on control points. . . . . . . . . . . 62 Components of a channel. . . . . . . . . . . . . . 73 B ezier coef cients of a 5 2. . . . . . . . . . . . . . 103 An n e =3-piece slef e with upper boundary e and lo wer boundary e . . 113 P arametrization and correspondence for geometric constraints (3a) and (3b)134 Geometric constraints (3a) and (3b). . . . . . . . . . . 164 Ov ershooting (pre v ented by capping half-spaces in Constraint (3c)).. . 186 T w o parallel planar curv es tra v ersing channels.. . . . . . . . 207 Solution curv e for a 2D channel. . . . . . . . . . . . 237 Channel solutions. . . . . . . . . . . . . . . 238 Robot path nding. . . . . . . . . . . . . . . 25 v

PAGE 6

Abstract of Thesis Presented to the Graduate School of the Uni v ersity of Florida in P artial Fulllment of the Requirements for the De gree of Master of Science LINEAR PR OGRAMMING APPR O A CH T O FITTING SPLINES THR OUGH 3D CHANNELS By Ashish Myles August 2004 Chair: J or g Peters Major Department: Computer and Information Science and Engineering Gi v en a polygonal channel between obstacles in the plane or in space, we present an algorithm for generating a parametric spline curv e with fe w pieces that tra v erses the channel and stays inside. While the problem without emphasis on fe w pieces has tri vial solutions, the problem for a limited b udget of pieces represents a nonlinear and continuous (innite) feasibility problem. Using tight, tw o-sided, piece wise linear bounds on the potential solution curv es, we reformulate the problem as a nite, linear feasibility problem whose solution, by standard linear programming techniques, is a solution of the channel tting problem. The algorithm allo ws the user to specify the de gree and smoothness of the solution curv e and to minimize an objecti v e function, for e xample, to approximately minimize the curv ature of the spline. W e describe in detail ho w to formulate and solv e the problem, as well as the problem of tting parallel curv es, for a spline in Bernstein-B ezier form. vi

PAGE 7

CHAPTER 1 INTR ODUCTION A c hannel is a f at curv e of v arying thickness that represents a contiguous opening between obstacle re gions as depicted in Figures1and8. The challenge is to solv e the channel problem. Channel problem Gi v en a channel, construct a spline of prescribed smoothness and number of control points that tra v erses and stays strictly inside the channel. Examples of channel problems are automated navigation for e xample, piloting a submarine through a narro w underw ater canal; tting piping for e xample, threading piping past e xisting structures while minimizing kinks to decrease resistance to o w; computing fr ee paths for analyzing nano-structures; designing curved cir cuitry ; parametrizing cutter paths so that the cutting tool a v oids obstacles and sudden acceler ation and deceleration; gr aph dr awing where graphs and netw orks ha v e to be laid out for better visualization. Man y of these tasks are too lar ge or time-constrained for human interv ention, say mo ving control points and visually checking for interference in the 2D projections. The channel problem can be tri vial or e xtremely dif cult depending on the smoothness requirements and the number of pieces prescribed. On one hand, if the b udget is no concern and the curv ature distrib ution and optimal smoothness are not crucial, nai v e approaches w ork; for e xample, rounding of f the piece wise linear channel center curv e, or using one higher -de gree polynomial piece per channel se gment and Hermiteinterpolating heuristically deri v ed v alues at the channel breakpoints. On the other hand, if the clearances are tight and fe w spline pieces are needed, the e xact constraints of the channel problem are nonlinear and continuous (also called innite), in that we need non-interference for e v ery parameter v alue. Of f hand, without additional structure, such 1

PAGE 8

2 (a) (b) Figure 1: Channel Problem. (a) A narro w planar channel tra v ersed by an approximately curv ature-minimizing planar spline. (b) A helical 3D channel (transparent, alternately dark and light gray rendered) that is tra v ersed by a space curv e whose B ezier control points are indicated as black squares. problems do not ha v e a bounded comple xity and are not tractable algorithmically In our approach, we deal with tight clearances and fe w pieces by approximating the e xact contraints. W e approximate safely from one side so that our output is certied to be a solution. In the process, we will miss solutions, b ut only solutions that an a posteriori test, based on the same tight bounding constructs, w ould also not be able to certify as solutions. Since continuous, nonlinear optimization is kno wn to be dif cult, we need only elaborate on the second claim that a trial-and-err or appr oac h with automatic renement of the spline will lik ely generate man y more spline control points than necessary and hence increase the cost for do wnstream processing, and introduce unnecessary oscillations into the spline path. Moreo v er the cost of checking non-interference is not ne gligible and comes with the same trade-of f: less sophisticated tests are f aster b ut yield poorer results in the number of pieces and quality of the resulting curv e. Figure1illustrates this point with an approach that w ould, at rst sight, appear to be reasonably ok in practice. The steps are: generate points on the central axis of the channel, construct an interpolating spline

PAGE 9

3 Figure 1: A nai v e approach to the channel problem: spline interpolation of the channel center line with an increasing number of curv e pieces. The rightmost channel sho ws additionally the cubic spline control polygon. The arro w indicates that the spline control polygon does not stay inside the channel and therefore still cannot certify that the curv e lies inside the channel. curv e, test for interference and rene or coarsen. There are man y possible interpretations of this general recipe and possibly one that w orks better than the specializations we tried. The e xamples in Figure1, use chord-length parametrization, Matlab' s cubic spline routine and uniform renement. After tw o renements, the 12 polynomial pieces of the curv e visually t into the channel. But the spline control polygon does not lie inside. That means that a control-point based test, such as checking the con v e x hull, w ould report interference and trigger a third renement. Also note the oscillations in the spline. The strate gy proposed in this paper returns the single polynomial curv e piece sk etched in Figure1belo w and sho wn in detail in Figure7, page23. The solution process also certies that the curv e lies in the channel. Our approach to solving the channel problem is to construct a (piece wise linear) slee v e around a candidate space curv e; then it is suf cient to constrain this slee v e rather than the original nonlinear curv e to stay within the channel as illustrated in Figure1.

PAGE 10

4 Carefully formulated, this approximation results in a linear feasibility pr oblem that is solv able as a Linear Program, say by the simple x method. (An alternati v e formulation, as semi-denite programming problem, will not be considered here.) A solution to the linear feasibility problem solv es the original problem and, due to the tightness of the slee v e that we use, only solutions with v ery lo w clearance are missed. The missed solution curv es are e xactly those that also the a posteriori intersection test, based on piece wise linear enclosure of the curv e with the same granularity w ould miss. (Note that testing intersection with Ne wton' s method w ould only be safe if we used interv al arithmetic [7]. Ef cient interv al arithmetic, in turn, depends on tight piece wise linear enclosures.) That is, a solution curv e that w ould be missed by the proposed approach w ould also be declared potentially intersecting by an a posteriori test of the same granularity While the channel problem only asks for a feasible curv e, we can add optimality and uniqueness by augmenting the feasibility problem with a linear (or quadratic) optimization function. The result is the standard linearly constrained minimization problem: min f ( b ) subject to linear equality and inequality constraints. The structure of the paper is as follo ws. In Section 2, we re vie w and select a slee v e. In Section 3, we dene spline, slee v es and parameterization. In Section 4, we list the constraints in full detail. In Section 5, we add an objecti v e function. In Section 6, we specialize the setup to 2D and parallel curv e problems. In Section 7, we illustrate the approach with se v eral e xamples.

PAGE 11

5 channel curve in sleeve curve in channel (a) (b) (c) Figure1:ThebasicideaofoursolutiontotheChannelproblem.Giventhe(simple2D) channel(a),apiecewiselinearenclosureorsleeveforacandidatecurveisconstructed(b) andtheproblemissolvedbyttingthesleeveintothechannel(c).

PAGE 12

CHAPTER 2 BOUNDING CONSTR UCTS AND RELA TED W ORK Construction of a slee v e around the spline curv e is equi v alent to enclosing the spline curv e with linear pieces. Ho we v er in the channel problem, the coef cients of the spline curv e are unkno wn and sought as the solution of the feasibility problem. Therefore one w ould lik e the enclosure to ha v e three properties. 1. The enclosure should depend linearly on the coef cients of the spline representation. 2. The enclosure should be as narro w as possible. 3. The enclosure should be renable to adapti v ely adjust to where the channel is particularly narro w or trick y to na vig ate. The literature of fers man y choices of enclosures or bounding constructs that could in principle be used to construct a slee v e (Figure2). Ho we v er requirement 1 rules out oriented bounding box es and con v e x hull based approaches, or b uilding a local coordinate system and bounding box in the normal direction [10]. In f act, Figure7illustrates that these enclosures are not suf ciently narro w e v en for simple channels. Requirement 2 rules out the use of e v en looser bounding constructs such as bounding spheres and axis-aligned bounding box es. The best match of linearity tightness and renability for the channel problem are the enclosures de v eloped in Lutterk ort [12] and Peters and W u [15]. Figure 2: Enclosures based on control points: (from left to right:) cubic curv e with control polygon, axis-aligned box, bounding circle, Filip [5] (scaled by 1/2), bounding ellipse [18], con v e x hull and 8 -dop [1,8,9], oriented bounding box [6], f at arc [16], 3-piece slef e [15]. 6

PAGE 13

7 PSfrag replacements nor mal cross-section c-piece c-se gment channel PSfrag replacements nor mal nor mal cross-section c-piece c-se gment channel (a) (b) Figure 2: Components of a channel. (a) An entire helix-shaped channel vie wed from the top. (b) A close-up vie w of tw o c-se gments with the front cross sections emphasized by thick lines. Ho we v er e v en these require a smart formulation to reduce the problem to the standard linearly constrained minimization problem. F or functions in one v ariable, a channel problem w as formulated in Lutterk ort [11]. Ho we v er for functions, as opposed to free-form curv es, the problem is much simpler since the parametrization is x ed and abo v e and belo w mak e sense. Another closely related class of problems appears in graph dra wing [3,17]. There, ho we v er the emphasis is on a lar ge number of piece wise linear curv es with fe w pieces.

PAGE 14

CHAPTER 3 MODELING THE PR OBLEM W e treat both the spline and the channel as a sequence of N pieces (Figure2), one to one matching each channel piece with one spline piece. A spline piece is one polynomial piece, b ut a channel piece can consist of n c se gments. That is, one spline piece can be threaded through a longer stretch of the channel. Each spline piece is enclosed by the n e se gments of its enclosing slee v e. Since we are dealing with parametrized space curv es, we need to create a correspondence of spline pieces with the channel. W e could do this by e xplicitly matching spline parameters to channel parameters (i.e., tra v ersing in lockstep). The other e xtreme is to allo w an y piece of the spline to be associated with an y piece of the channel. The rst option is con v enient for implementation since it simplies the constraints. Ho we v er we found that it is too restricti v e: good solutions were not found. The dra wback of the second solution is not only that we need to check e v ery breakpoint ag ainst e v ery channel se gment, b ut also that the curv e can turn back onto itself. W e a v oid both e xtremes by matching pieces, specically associating the break points of the slee v e with specic channel se gments. This allo ws w orking locally and pre v ent multiple tra v ersal of se gments. In the ne xt tw o subsections, we dene the channel and the slee v e in detail so that we can formalize the correspondence of in Section4. 3.1 Channel Denition Each channel piece, or c-piece, is a sequence of cr oss-sections A cross-section has edges. F or e xample, in Figure2, each cross-section is quadrilateral (i.e., = 4 ). The v ertices need not be co-planar Adjacent cross-sections span a channel se gment, short c-se gment The f aces of the c-se gment are split into triangles with normals consistently oriented outw ards. In Figure2(a), each c-piece consists of tw o adjacent c-se gments. 8

PAGE 15

9 The cross-sections (and hence the channel se gments) do not ha v e to be con v e x. Ho we v er the formulated constraints will force the curv e through the (con v e x) intersection of all the halfspaces dened by the f acets of the channel se gment. In our implementation, the f aces are triangulated using the same pattern to simplify the channel representation and is constant; b ut the channel can be designed with dif ferent v alues of at e v ery cross-section and the triangulation can be arbitrary with consistent normals. 3.2 Spline Denition F or simplicity we represent the space curv e in B ezier form; it is not dif cult to use a b-spline representation instead. A polynomial b of de gree d with respect to the interv al [0 :: 1] can be written in terms of the B ezier basis functions B d ` ( t ) as: b ( t ) := d X ` =0 b ` B d ` ( t ) ; B d ` ( t ) := d ` (1 )Tj/T1_1 11.9552 Tf11.9537 0 Td(t ) d )Tj/T1_3 7.97012 Tf6.57539 0 Td(` t ` ; where the b ` are the contr ol points If b ` = ( b `;x ; b `;y ; b `;z ) is a three-dimensional control point then b ( t ) = ( b x ( t ) ; b y ( t ) ; b z ( t )) 3.3 Slef e Denition Our method is based on slef e s ( slef e is short for: subdi vidable linear ef cient function enclosure, and is pronounced lik e slee v e) de v eloped in Lutterk ort [12], Peters [13], and Peters and W u [15]. F or polynomials of de gree d in B ezier form, the upper and the lo wer boundary of the slef e are a linear combination of piece wise linear functions a d i and a d i i = 1 ; : : : ; d )Tj/T1_2 11.9552 Tf12.37891 0 Td(1 (see Equation4.1or3.1belo w). Specic a d i and a d i ha v e been tab ulated for v arious combinations of d and n e and are a v ailable for do wnload [19]. Since slef e s are a relati v ely ne w construct, we gi v e some background in the ne xt paragraph. This information is not necessary to use slef e s in the conte xt of this paper b ut may be of interest to some readers.

PAGE 16

10 The functions a d i and a d i bound a specic polynomial a d i of de gree d from abo v e and belo w for t 2 [0 :: 1] : a d i ( t ) a d i ( t ) a d i ( t ) : The B ezier coef cients of a d i after scaling by the ne g ati v e number i )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 i + d )Tj/T1_2 7.97012 Tf6.57539 0 Td(i )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 d )Tj/T1_2 7.97012 Tf6.57533 0 Td(i )Tj/T1_4 11.9552 Tf12.3506 0 Td(2 are (Figure3for d = 5 and i = 2 ) 0 i ; 1 i ; : : : i )Tj/T1_4 11.9552 Tf11.9537 0 Td(1 i ; i i = d )Tj/T1_1 11.9552 Tf11.9537 0 Td(i d )Tj/T1_1 11.9552 Tf11.9537 0 Td(i ; d )Tj/T1_1 11.9552 Tf11.9537 0 Td(i )Tj/T1_4 11.9552 Tf11.9537 0 Td(1 d )Tj/T1_1 11.9552 Tf11.9537 0 Td(i ; : : : 1 d )Tj/T1_1 11.9552 Tf11.9537 0 Td(i ; 0 d )Tj/T1_1 11.9552 Tf11.9254 0 Td(i It is easy to check, that a d i is uniquely dened by the constraints Figure 3: B ezier coef cients of a 5 2 a d i (0) = a d i (1) = 0 ; D j a d i = 8 > > < > > : 1 if i = j 0 else where D j b := b j )Tj/T1_6 7.97012 Tf6.57529 0 Td(1 )Tj/T1_4 11.9552 Tf11.9537 0 Td(2 b j + b j +1 : F or de gree d = 3 a d 1 has the coef cients 0 ; )Tj/T1_4 11.9552 Tf9.28915 0 Td(2 = 3 ; )Tj/T1_4 11.9552 Tf9.28915 0 Td(1 = 3 ; 0 and a d 2 ( t ) = a d 1 (1 )Tj/T1_1 11.9552 Tf12.1805 0 Td(t ) so that h D 1 a d 1 D 2 a d 1 D 1 a d 2 D 2 a d 2 i = [ 1 0 0 1 ] : Since there are only fe w a d i and these polynomials are independent of the spline pieces b the narr owest enclosures ha v e been pre-computed and tab ulated once and for all for v arious n e : the tables simply contain the v alues of a d i and a d i at n e + 1 (equally spaced) breakpoints. The functions a d i a d i are weighted by the second dif ferences D i b and the result is added to the linear interpolant l ( b ) := (1 )Tj/T1_1 11.9552 Tf12.2372 0 Td(t ) b 0 + tb d of the end points. (In general, say for a spline in B-spline form, l ( b ) can be chosen as an y piece wise linear approximation, for e xample the control polygon.) That is, on the interv al [0 :: 1] e b ( t ) e ; (3.1)

PAGE 17

11 PSfrag replacements e e spline se gment ( slef e ) e -se gment Figure 3: An n e =3-piece slef e with upper boundary e and lo wer boundary e The four B ezier control points of the cubic piece are sho wn as squares. where e := l ( b ) + P d )Tj/T1_7 7.97012 Tf6.57533 0 Td(1 i =1 a d i min f 0 ; D i b g + a d i max f 0 ; D i b g e := l ( b ) + P d )Tj/T1_7 7.97012 Tf6.57533 0 Td(1 i =1 a d i max f 0 ; D i b g + a d i min f 0 ; D i b g : Note that e and e are piece wise linear since l ( b ) a d i and a d i are, b ut that e and e do not linearly depend on the coef cient b i due to the min and max selections. Ho we v er with care, we will still be able to formulate the e xpressions as linear inequality constraints in Section 5. Also note that either min f 0 ; D i b g = 0 or max f 0 ; D i b g = 0 so that e has only d summands. W e observ e in practice that only little is lost by tting a slef e inside the channel rather than a spline inside the channel since the tables recording the breakpoint v alues of a d i and a d i ha v e been pre-optimized. Peters and W u [14] sho w that for an y con v e x cubic piece b the ratio between the tightest possible slee v e for b and the slef e e and e of b is al w ays less than 1 : 07 3.4 Slee v e Denition Conforming to the se gmentation of the channel, the slef e of each polynomial piece is called an enclosure or e-piece (Figure3). Each linear se gment in the e-piece is an

PAGE 18

12 t = 0 1/3 2/3 1 a 3 1 -.0695214343 -.4398918047 -.3153515940 -.0087327217 a 3 1 0 -.3703703704 -.2962962963 0 T able 3: Slef e s a 3 1 and a 3 1 of the basis a 3 1 e-se gment and there are n e e-se gments per e-piece. W ith 2 f x; y g for a planar curv e or 2 f x; y ; z g for a spatial curv e, e-pieces are dened in the follo wing terms. b p `; is the -component of the ` th B ezier control point of the p th polynomial piece of the solution spline curv e. b p (note the g ap in the subscript) is the v ector whose ` th entry is b p `; l ( b p ) is the linear interpolant of the rst and last control points of the p th polynomial piece in the solution. e p and e p are the the upper and lo wer e-pieces, respecti v ely of the p th polynomial piece for the th coordinate. D i b p is the i th second dif ference of the B ezier coef cients of b p ( t ) : D i b p := b p i )Tj/T1_3 7.97012 Tf6.57533 0 Td(1 )Tj/T1_2 11.9552 Tf11.9537 0 Td(2 b p i + b p i +1 The th coordinate of D i b p is denoted by D i b p and D b p is the v ector of the d )Tj/T1_2 11.9552 Tf11.9537 0 Td(1 second dif ferences of b p a d and a d are matrices of size n e + 1 d )Tj/T1_2 11.9552 Tf12.2939 0 Td(1 whose i th column lists the v alues of the lo wer respecti v ely upper slef e of a d i at ( s=n e ) s =0 ;::: ;n e These v alues ha v e been tab ulated [19]. T able3sho ws the slefe bases a 3 1 and a 3 1 ; and the table for i = 2 is mirror symmetric since a 3 2 (1 )Tj/T1_1 11.9552 Tf11.9537 0 Td(t ) = a 3 1 ( t ) 3.5 Correspondence of the Channel and the Spline Enclosure W e parametrize the channel and the slef e so that we can locally associate c-se gments with e-se gments and vice v ersa. The start parameter of each (cor e-) piece is t = 0 and the end parameter is t = 1 The internal parameters increase uniformly with the inde x as illustrated in Figure3(b). Let ^ v p c be a breakpoint (on the c th cross section of the p th piece) of the channel. Then c n c is its per -piece, local parameter Let s := d c n e n c e be

PAGE 19

13 PSfrag replacements j th c-se gment on p th subchannel nor mal p c v p c e p s PSfrag replacements j th c-se gment on p th subchannel nor mal p c v p c e p s ^ v p c (0) (1/3) (2/3) (1) [0] [1/4] [1/2] [3/4] [1] e p s )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 e p s ^ e p (a) (b) Figure 3: P arametrization and correspondence for geometric constraints (3a) and (3b). The box es at each enclosure breakpoint represent the 2 dim =8 possible choices for e p s 2 f e p x;s ; e p x;s g f e p y ;s ; e p y ;s g f e p z ;s ; e p z ;s g the smallest inte ger lar ger than c n e n c Then e p s is the slee v e' s breakpoint with the smallest parameter such that s n e c n c (i.e., with a parameter just to the right of c n c ). W e dene the point on the slee v e corresponding to ^ v p c as ^ e p := ue p s )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 + (1 )Tj/T1_1 11.9552 Tf11.9537 0 Td(u ) e p s ; where u := s )Tj/T1_1 11.9552 Tf11.9537 0 Td(c n e n c : (3.2) F or e xample, Figure3(b) (see also Figure4(b)), sho ws the fractional parameters of the c-piece in parentheses and the parameters of the corresponding e-piece of the slee v e in brack ets for n e = 4 n c = 3 c = 2 and s = d c (4 = 3) e = d 8 = 3 e = 3 Then u = s )Tj/T1_1 11.9552 Tf11.9537 0 Td(c (4 = 3) = 1 = 3 yields ^ e p = ( e p s )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 + 2 e p s ) = 3 .

PAGE 20

CHAPTER 4 THE CONSTRAINT SYSTEM W e can no w formulate the 3D channel problem as a linearly constrained feasibility problem for tting a de gree d spline with N polynomial e-pieces through a channel with N c-pieces. The follo wing subsections mak e each of the constraints precise: (1) Min-max selection of second dif ferences. (2) Channel correspondence and smoothness of the spline. (3a) Slef e corners are in the channel. (3b) Channel corners are outside the slee v e. (3c) Slef e se gment is inside the channel se gment. The constraints apply to pieces p coef cients ` dif ferences i and coordinates : p = 1 ; : : : ; N ; i = 1 : : : ; d )Tj/T1_3 11.9552 Tf11.9537 0 Td(1 ; ` = 0 : : : ; d; 2 f x; y ; z g : 4.1 Min-Max Selection Our rst challenge is to formulate the min and max selection as linear equalities and inequalities. T o this end, we dene, in addition to the unkno wn coef cients b p `; ; the auxiliary v ariables D i b p ; D i b p )Tj/T1_5 7.97012 Tf0 -8.39055 TD( and D i b p + : That is, we ha v e a total of N (3( d )Tj/T1_3 11.9552 Tf12.6624 0 Td(1) + d + 1) dim scalar -v alued unkno wns, where dim = 3 for a space curv e and dim = 2 for a planar curv e. The name D i b p )Tj/T1_5 7.97012 Tf0 -8.36221 TD( for a single, scalar unkno wn is some what length y b ut it is precise and w ould appear in code as dbm[p,i, ]. D i b p )Tj/T1_5 7.97012 Tf0 -8.39055 TD( will play the role of min f 0 ; D i b p g and D i b p + will stand in for max f 0 ; D i b p g That is, for p = 1 ::N i = 1 :: ( d )Tj/T1_3 11.9552 Tf11.9537 0 Td(1) and 2 f x; y ; z g we will compute a 14

PAGE 21

15 slee v e ~ e p and ~ e p ~ e p := l ( b p ) + P d )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 i =1 a d i D i b p )Tj/T1_3 7.97012 Tf0 -8.36221 TD( + a d i D i b p + ; (4.1) ~ e p := l ( b p ) + P d )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 i =1 a d i D i b p + + a d i D i b p )Tj/T1_3 7.97012 Tf0 -8.39053 TD( (4.2) such that ~ e p e p e p ~ e p : The constraints are as follo ws. (1) Min-max selection of second dif ferences: ( dim N ( d )Tj/T1_1 11.9552 Tf11.9254 0 Td(1) 3 ) constraints D i b p + D i b p and D i b p + 0 and D i b p + + D i b p )Tj/T1_3 7.97012 TfT*( = D i b p where D i b p := b p i )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 )Tj/T1_1 11.9552 Tf11.9537 0 Td(2 b p i + b p i +1 This implies D i b p )Tj/T1_3 7.97012 Tf0 -8.36221 TD( D i b p and D i b p )Tj/T1_3 7.97012 TfT*( 0 and that, for some p i; 0 D i b p )Tj/T1_3 7.97012 Tf0 -8.36221 TD( := min f 0 ; D i b p g )Tj/T1_2 11.9552 Tf11.9537 0 Td( p i; and D i b p + := max f 0 ; D i b p g + p i; : Therefore ~ e p = e p + P d )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 i =1 p i; ( a d i )Tj/T1_2 11.9552 Tf12.6624 0 Td(a d i ) e p and ~ e p e p as claimed. That is, we are potentially tting a wider slee v e than the slef e into the channel. This is the correct inclusion since tting the wider slee v e guarantees that the narro wer slef e of the solution curv e ts; this, in turn, implies that the solution curv e ts into the channel. In f act, the objecti v e function discussed in Section 5 will dri v e the sum of the p i; to zero. 4.2 Correspondence and Smoothness Lik e all linear equality constraints, the ne xt set of constraints could be eliminated by substitution. The rst constraint pre v ents a curv e piece from freely sliding to another c-se gment (see also (3c) belo w). (2) Correspondence and Smoothness: ( (3 N )Tj/T1_1 11.9552 Tf11.9537 0 Td(2) dim ) constraints b p 0 ; = center of the starting cross-section of the p th piece. C 0 continuity: b p d; = b p +1 0 ; C 1 continuity: b p d; = 1 2 )Tj/T1_2 11.9552 Tf5.47087 -9.66614 Td(b p d )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 ; + b p +1 1 ; .

PAGE 22

16 PSfrag replacements c th c-se gment on p th subchannel nor mal p c v p c e p s ^ v p c (0) (1/3) (2/3) (1) [0] [1/4] [1/2] [3/4] [1] e p s )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 e p s ^ e p channel slef e nor mal p c [1/2] (2/3) [3/4] v p c PSfrag replacements c th c-se gment on p th subchannel nor mal p c v p c e p s ^ v p c (0) (1/3) (2/3) (1) [0] [1/4] [1/2] [3/4] [1] e p s )Tj/T1_6 7.97012 Tf6.57533 0 Td(1 e p s ^ e p channel slef e nor mal p c [1/2] (2/3) [3/4] v p c ^ v p c (a) (b) Figure 4: Geometric constraints (3a) and (3b). Lateral cross-section vie w of channel violations to be pre v ented: (a) a slef e breakpoint could pierce a channel se gment, or (b) a channel breakpoint could pierce the slef e Additional constraints that can be e xpressed as linear equalities or inequalities, such as C 2 continuity can be just as easily added to the system. 4.3 Interference Checks The remaining constraints combine the x y and z components to ensure that the curv e stays inside the channel. Here the piece wise linear nature of e and e pays of f. F or e p s; 2 f e p s; ; e p s; g let e p i := ( e p s;x ; e p s;y ; e p s;z ) be one of 2 dim possible combinations of upper or lo wer slef e breakpoints for a gi v en s (cf. Figure3(a)). Using the parametric correspondence of Section3.5, we can test the sign of the signed v olume of tetrahedra with one point on the e-piece and a corr esponding channel triangle as base. Equi v alently we can compute the sign of the inner product of the triangle' s normal with the edge pointing from an y of the three v ertices of the triangle to the point on the e-piece. Specically by k eeping e p s inside the corresponding channel se gment, Constraint (3a) and (3c) belo w mak es sure that the slee v e does not pierce the channel. Con v ersely Constraint (3b) mak es sure that the channel does not pierce the slee v e. The number of constraints can be reduced by only testing conca v e, inw ardpointing breakpoints of the channel. Both in (3a) and (3b), nor mal p c is the outw ard-

PAGE 23

17 pointing channel normal. Note that the constraints depend on b p s; via Equation4.1on page15. (3a) Slef e corners in the channel: ( 2 dim 2 N ( n e + 1) ) constraints F or each piece and se gment, for each e p s where e p s; 2 f e p s; ; e p s; g and e v ery triangle of the corresponding c-se gment, choose an y v erte x v p c of the triangle to form the constraint (cf. Figures3(a) and4(a)) nor mal p c ( e p s )Tj/T1_1 11.9552 Tf11.9537 0 Td(v p c ) 0 : (3b) Channel corners outside the slee v e: ( 2 dim 4 N ( n c + 1) ) constraints At each channel cross-section, for e v ery triangle on the tw o adjacent c-se gments connected at the cross-section, choose an y v erte x ^ v p c on the triangle and the point ^ e p on the slee v e dened by Equation3.2, page13and enforce (cf. Figures3(b) and4(b)) nor mal p c ( ^ e p )Tj/T1_4 11.9552 Tf12.37891 0 Td(^ v p c ) 0 : By constraining one interior point ^ e p := ue p s )Tj/T1_8 7.97012 Tf6.57533 0 Td(1 + (1 )Tj/T1_1 11.9552 Tf12.6057 0 Td(u ) e p s of the line se gment from e p s )Tj/T1_8 7.97012 Tf6.57533 0 Td(1 to e p s to lie in both (e xtended) channel se gments, (3b) actually enforces that the whole se gment lies inside the channel, pro vided e p s )Tj/T1_8 7.97012 Tf6.57533 0 Td(1 and e p s do. This is remarkable since testing to which side of a f acet of the slee v e the point ^ v p c lies (in order to rule out that it pierces the slee v e) is of f-hand not linear in the unkno wns: it is a constraint on the sign of the signed v olume of the tetrahedra where three points lie on the unkno wn slee v e and the fourth point is ^ v p c Ef fecti v ely the formulation (3b) reduces a nonlinear to a linear constraint! There is one nal consideration: Constraint (3a) only connes e p s to the tunnel-lik e intersection of the halfspaces forming the corresponding c-se gment. W e still need to cap of f this tunnel to pre v ent o v ershooting, as illustrated in 2D in Figure4(a). That is, a slef e breakpoint could satisfy (3a) b ut lie outside the channel. The planes of the ne xt and pre vious c-se gment that cap of f the tunnel are those whose normal forms a sharp angle

PAGE 24

18 PSfrag replacements e p s )Tj/T1_4 7.97012 Tf6.57533 0 Td(1 e p s e p s +1 ^ e p PSfrag replacements e p s )Tj/T1_4 7.97012 Tf6.57533 0 Td(1 e p s e p s +1 ^ e p capping plane (a) (b) Figure 4: Ov ershooting (pre v ented by capping half-spaces in Constraint (3c)). with the lateral, non-cross-section edges of the c-se gment oriented from s )Tj/T1_5 11.9552 Tf12.01041 0 Td(1 to s At the s th cross-section, the normals must be nearly aligned with the oriented lateral edges; at the s )Tj/T1_5 11.9552 Tf11.9537 0 Td(1 st cross-section the y must be nearly opposite to the oriented lateral edges. (3c) Slef e inside channel se gment: ( 2 dim f 2 + 2 g N n e ) constraints F or each e p s where e p s; 2 f e p s; ; e p s; g and e v ery capping plane (with normal nor mal p j ) of the c-se gment, choose an y v erte x v p c in the capping plane to form the constraint nor mal p c ( e p s )Tj/T1_1 11.9552 Tf11.9537 0 Td(v p c ) 0 : W e observ e that for an y curv e violating (3c) there appears to be another feasible curv e with lo wer sum of absolute second dif ferences (Figure4(b) without the loop) that can be obtained by purely local operations. Gi v en our choice of objecti v e function in Section5belo w this e xplains wh y we ha v e ne v er observ ed Constraint (3c) tak en on.

PAGE 25

CHAPTER 5 THE OBJECTIVE FUNCTION The standard Linear Program has the form min f ( b ) ; subject to linear equality and inequality constraints. The pre vious section listed the constraints (1,2,3a,3b,3c) and we may add an objecti v e function f (If there is no objecti v e function, then the problem is called a linear feasibility problem.) A possible choice for f is to minimize the sum of the absolute seconddif ferences, penalizing loops and oscillations. Since D i b p + 0 D i b p )Tj/T1_3 7.97012 TfT*( 0 and D i b p + + D i b p )Tj/T1_3 7.97012 TfT*( = D i b p we ha v e that D i b p + )Tj/T1_2 11.9552 Tf12.37891 0 Td(D i b p )Tj/T1_3 7.97012 TfT*( is minimal if one of D i b p + and D i b p )Tj/T1_3 7.97012 Tf0 -8.36223 TD( is zero and the other equals D i b p or equi v alently j D i b p j = D i b p + )Tj/T1_2 11.9552 Tf12.49229 0 Td(D i b p )Tj/T1_3 7.97012 TfT*( Hence, to minimize kinks, we choose the objecti v e function N X p =1 d )Tj/T1_4 7.97012 Tf6.57533 0 Td(1 X i =1 X 2f x;y ;z g D i b p + )Tj/T1_2 11.9552 Tf11.9254 0 Td(D i b p )Tj/T1_3 7.97012 TfT*( : This problem can no w be handed to a standard linear constraint solv er say solv ers that use the interior point method or the simple x method. If the problem has no solution, some solv ers return an answer minimizing infeasibility and a list of violated constraints. This indicates the location where to increase the de gree d or the number of slef e se gments n e or to decrease the number of channel se gments n c per piece. 19

PAGE 26

CHAPTER 6 PLAN AR CHANNELS AND P ARALLEL CUR VES A 2D channel has an upper and a lo wer piece wise linear boundary (with normals oriented outw ards). The slef e stays within such a planar channel if we enforce a simplied v ersion of (3a) and (3b). W e arbitrarily name one channel boundary upper and the other lo wer nor mU pper p c and nor mLow er p c their normals and upper p c and l ow er p c their respecti v e breakpoints. Then (3a) and (3b) become nor mU pper p c ( e p s )Tj/T1_2 11.9552 Tf11.9537 0 Td(upper p c ) 0 ; nor mLow er p c ( e p s )Tj/T1_2 11.9552 Tf11.9537 0 Td(l ow er p c ) 0 ; nor mU pper p c ( ^ e p )Tj/T1_2 11.9552 Tf11.9537 0 Td(upper p c ) 0 ; nor mLow er p c ( ^ e p )Tj/T1_2 11.9552 Tf11.9537 0 Td(l ow er p c ) 0 : The formulation of the 2D problem can be adapted to thread multiple parallel curv es through a channel. F or e xample, to thread tw o parallel curv es, width w apart, the constraints for the upper channel change to nor mU pper p c ( e p s )Tj/T1_2 11.9552 Tf11.9537 0 Td(upper p c ) w ; nor mU pper p c ( ^ e p )Tj/T1_2 11.9552 Tf11.9537 0 Td(upper p c ) w : This results in a spline solution p 1 ( t ) with a b uf fer distance of w between the curv e and the upper channel. Since ( w nor mU pper p c ) nor mU pper p c = w this is ef fecti v ely equi v alent to narro wing the channel by w Then, a second curv e p 2 ( t ) := p 1 ( t ) + w ^ n ( t ) can t through the channel, where ^ n ( t ) is the normal at p 1 ( t ) oriented to w ard the upper channel. Since p 2 is an of fset curv e, it is in general not polynomial [4]. Moreo v er of fset curv es are smooth only if w is smaller than the smallest radius of curv ature of p 1 ; otherwise self-intersections ha v e to be trimmed of f and smoothed out. Of course w could also be chosen as w ( t ) with a v arying, b ut prescribed v alue. 20

PAGE 27

21 (a) (b) Figure6:Twoparallelplanarcurvestraversingchannels.(a)Asplineanditsoffset avoidinganinnerandanouterchannelboundary.(b)Achannelwithlongsectionsand sharpturnswithdetailenlarged.

PAGE 28

CHAPTER 7 EXAMPLES The e xamples throughout the paper were run on a Pentium 4 2.4GHz with 512 MB RAM using the freely a v ailable open-source PCx [2] linear constraint solv er The constraints were automatically generated by a script on input of the channel v ertices. Figure7demonstrates that a t based on bounding the control polygon w ould not be able to generate our tight solutions to the channel problem e v en after subdi vision. The channel in Figure7(a) consists of twelv e c-se gments. T o accommodate the sharp turns while maintaining C 1 continuity we chose n c = 1 (i.e., one polynomial per c-se gment). F ormulated in 3D (the channel has depth perpendicular to the vie wing direction), the problem w as solv ed in 0.24 seconds. Both Figure2(b) and Figure7(b) consist of twenty se gments. The solution spline is of de gree d = 4 n c = 2 and one polynomial piece ts each pair of c-se gments. The solution time v aries with the narro wness of the channel: 2.64 seconds for the left and 3.42 seconds for the right e xample in Figure7. The nal e xample is Figure8. Here a safe, smooth path for a ( 0 : 96 -unit wide) robot is computed. The top-left image sho ws the obstacles. As a rst step, an channel is traced through the obstacles so that our path-tting method can be applied. The bottomleft sho ws the spline path t through the channel maintaining a 0 : 48 -unit b uf fer on either side. The bottom-right sho ws the robot at equal parameter increments tra v ersing the en vironment. 22

PAGE 29

23 (a) (b) Figure 7: Solution curv e for a 2D channel. The B ezier control points are indicated as black squares. (a) The control polygon of the solution lies well outside the channel although the slef e ts within. (b) Also after subdi vision, the control polygon of the solution e xceeds the channel boundaries. (a) (b) Figure 7: Channel solutions. (a) A 2D channel with 1 c-se gment per c-piece. (c-pieces alternate in color). There is one piece of de gree 3 per c-piece. (b) A 3D channel with tw o c-se gments per c-piece. The spline curv e is of de gree 4.

PAGE 30

CHAPTER 8 SUMMAR Y The slee v e-based approach may be vie wed as bridging a g ap between techniques of computational geometry and geometric design since we tightly link linear discrete with non-linear continuous representations. While the constraints appear at rst sight comple x, the y are all necessary to guar antee correctness while allo wing for a wide range of solutions with e xible parametrization within each se gment for parametric space curv es. Although costlier than nai v e approaches, the o v erall optimization frame w ork has the adv antage of pro viding an objecti v e function to pick solutions with preferred properties. 24

PAGE 31

25 (a) (b) (c) (c) Figure8:Robotpathnding.(a)Robotfacedwithobstacles.(b)Abstractionofthe problembydeningachannel.(c)Solutionofthechannelproblem(withoffsets).(d) Robotpath(black,smoothcurve).

PAGE 32

REFERENCES [1] A. Crosnier and J. R. Rossignac. T echnical section tribox bounds for threedimensional objects. Computer s and Gr aphics 23(3):429, June 1999. [2] Joe Czyzyk, Sanjay Mehrotra, Michael W agner and Stephen Wright (1997). PCx: Softw are for linear programming.http://www-fp.mcs.anl.go v/otc/T ools/PCx. Accessed July 2004. [3] D. Dobkin, E.R. Gansner E. K outsoos, and S.C. North. A path router for graph dra wing. In Pr oceedings of the 14th annual symposium on Computational Geometry pages 415. A CM Press, Ne w Y ork, 1998. June 1-10 1998, Minneapolis, MN. [4] R. T F arouki and T Sakkalis. Pythagorean hodographs. IBM J ournal of Resear c h and De velopment 34(5):736, September 1990. [5] D. Filip, R. Magedson, and R. Mark ot. Surf ace algorithms using bounds on deri v ati v es. Computer Aided Geometric Design 3(4):295, 1986. [6] Stef an Gottschalk, Ming Lin, and Dinesh Manocha. OBBT ree: A hierarchical structure for rapid interference detection. In Pr oceedings of the A CM Confer ence on Computer Gr aphics pages 171, Ne w Y ork, August 4 1996. A CM. [7] Jon Rokne H. Ratschek. Geometric computations with interval and ne w r ob ust methods: with applications in computer gr aphics, GIS and computational g eometry Horw ood Publishing, Chichester 2003. [8] T imoth y L. Kay and James T Kajiya. Ray tracing comple x scenes. In Da vid C. Ev ans and Russell J. Athay editors, Computer Gr aphics (SIGGRAPH '86 Pr oceedings) v olume 20, pages 269, August 1986. [9] James T Kloso wski, Joseph S. B. Mitchell, Henry So wizral, and Karel Zikan. Ef cient collision detection using bounding v olume hierarchies of k-DOPs. IEEE T r ansactions on V isualization and Computer Gr aphics 4(1):21, January 1998. [10] Leif K obbelt, Katja Daubert, and Hans-Peter Seidel. Ray tracing of subdi vision surf aces. In Rendering T ec hniques '98 (Pr oceedings of the Eur o gr aphics W orkshop) pages 69, Ne w Y ork, June 1998. Springer -V erlag. [11] D. Lutterk ort and J. Peters. Smooth paths in a polygonal channel. In Pr oceedings of the 15th Annual Symposium on Computational Geometry pages 316, Miami Beach, Florida, 1999. 26

PAGE 33

27 [12] Da vid Lutterk ort. En velopes for nonlinear g eometry PhD thesis, Purdue Uni v ersity May 2000. [13] J. Peters. Ef cient one-sided linearization of spline geometry In R.R. Martin, editor Mathematics of Surfaces X pages 297. IMA, 2003. [14] J. Peters and X. W u. On the optimality of piece wise linear max-norm enclosures based on slefes. In Pr oceedings of the 2002 St Malo Confer ence on Curves and Surfaces pages 335, St Malo, France, 2002. [15] J. Peters and X. W u. Sle v es for planar spline curv es. Computer Aided Geometric Design 21(6):615, 2004. [16] Thomas W Sederber g, Scott C. White, and Alan K. Zundel. F at arcs: A bounding re gion with cubic con v er gence. Comput. Aided Geom. Design 6:205, 1989. [17] Roberto T amassia. Graph dra wing. In J.-R. Sack and J. Urrutia, editors, Handbook of Computational Geometry Else vier North-Holland, Netherlands, 2000. [18] E. W elzl. Smallest enclosing disks (balls and ellipsoids). In Hermann Maurer editor Pr oceedings of Ne w Results and Ne w T r ends in Computer Science v olume 555 of LNCS pages 359, Berlin, German y June 1991. Springer [19] X. W u and J. Peters (2002). SubLiME (subdi vidable linear maximum-norm enclosure) package.http://www .cise.u.edu/research/SurfLab/do wnload/SubLiME.tar .gz. Accessed July 2004.

PAGE 34

BIOGRAPHICAL SKETCH I w as born in 1980 in a to wn called V aranasi in North India. I w as brought up in Ne w Delhi, India' s capital, til I w as about 10. After li ving tw o years in Oman, and an additional tw o in South India, I e w across the w orld to Orlando, Florida, on Feb 1, 1994. Here, I attended my high school and endured the intensity of the International Baccalaureate program. I entered the Uni v ersity of Florida in 1998 as an under graduate and published my rst paper in A CCV 2002 on wheelchair tracking. I continued here for my MS with a focus in computational geometry and I will be graduating this summer 2004. 28


Permanent Link: http://ufdc.ufl.edu/UFE0006260/00001

Material Information

Title: Linear Programming Approach to Fitting Splines through 3D Channels
Physical Description: Mixed Material
Copyright Date: 2008

Record Information

Source Institution: University of Florida
Holding Location: University of Florida
Rights Management: All rights reserved by the source institution and holding location.
System ID: UFE0006260:00001

Permanent Link: http://ufdc.ufl.edu/UFE0006260/00001

Material Information

Title: Linear Programming Approach to Fitting Splines through 3D Channels
Physical Description: Mixed Material
Copyright Date: 2008

Record Information

Source Institution: University of Florida
Holding Location: University of Florida
Rights Management: All rights reserved by the source institution and holding location.
System ID: UFE0006260:00001


This item has the following downloads:


Full Text











LINEAR PROGRAMMING APPROACH
TO FITTING SPLINES THROUGH 3D CHANNELS
















By

ASHISH MYLES


A THESIS PRESENTED TO THE GRADUATE SCHOOL
OF THE UNIVERSITY OF FLORIDA IN PARTIAL FULFILLMENT
OF THE REQUIREMENTS FOR THE DEGREE OF
MASTER OF SCIENCE

UNIVERSITY OF FLORIDA


2004


































Copyright 2004

by

Ashish Myles















ACKNOWLEDGMENTS

This research was supported by NSF Grant CCR-9901894 at the University of

Florida. Xiaobin Wu contributed the slefe tabulations [19].















TABLE OF CONTENTS
page

ACKNOWLEDGMENTS ................... ............ iii

LIST OF FIGURES .................. ................. v

ABSTRACT. ................... ................... vi

1 INTRODUCTION ................... ............. 1

2 BOUNDING CONSTRUCTS AND RELATED WORK ............. 6

3 MODELING THE PROBLEM ..... ...... ......... 8

3.1 Channel Definition ................... ........ 8
3.2 Spline Definition ................... ......... 9
3.3 Slefe Definition . .. ........... ....... 9
3.4 Sleeve Definition .................. .......... 11
3.5 Correspondence of the Channel and the Spline Enclosure ....... 12

4 THE CONSTRAINT SYSTEM ....... .......... ....... 14

4.1 Min-Max Selection ................... ......... 14
4.2 Correspondence and Smoothness .................. .. 15
4.3 Interference Checks ................... ......... 16

5 THE OBJECTIVE FUNCTION ...... ........... ........ 19

6 PLANAR CHANNELS AND PARALLEL CURVES ............. 20

7 EXAMPLES ............................ ....... 22

8 SUMMARY .................. ......... ........ 24

REFERENCES ......................... ....... 26

BIOGRAPHICAL SKETCH ..... .. .................. 28















LIST OF FIGURES
Figure page

1-1 Channel problem . . . . . . . 1

1-2 A naive approach to the channel problem . . . . 3

1-3 The basic idea of our solution to the Channel problem . . 4

2-1 Enclosures based on control points ...... . .. . 6

2-2 Components of a channel . . . . . ... 7

3-1 B6zier coefficients of a ................... . 10

3-2 An ne=3-piece slefe with upper boundary Te and lower boundary e . 11

3-3 Parametrization and correspondence for geometric constraints (3a) and (3b) 13

4-1 Geometric constraints (3a) and (3b) . . . ....... . 16

4-2 Overshooting (prevented by capping half-spaces in Constraint (3c)). 18

6-1 Two parallel planar curves traversing channels. . . 20

7-1 Solution curve for a 2D channel . . . .... .. 23

7-2 Channel solutions . . . . . . . 23

8-1 Robot path finding . . . . . . . 25















Abstract of Thesis Presented to the Graduate School
of the University of Florida in Partial Fulfillment of the
Requirements for the Degree of Master of Science

LINEAR PROGRAMMING APPROACH
TO FITTING SPLINES THROUGH 3D CHANNELS

By

Ashish Myles

August 2004

Chair: Jirg Peters
Major Department: Computer and Information Science and Engineering

Given a polygonal channel between obstacles in the plane or in space, we present

an algorithm for generating a parametric spline curve with few pieces that traverses

the channel and stays inside. While the problem without emphasis on few pieces has

trivial solutions, the problem for a limited budget of pieces represents a nonlinear and

continuous ("infinite") feasibility problem. Using tight, two-sided, piecewise linear

bounds on the potential solution curves, we reformulate the problem as a finite, linear

feasibility problem whose solution, by standard linear programming techniques, is a

solution of the channel fitting problem. The algorithm allows the user to specify the

degree and smoothness of the solution curve and to minimize an objective function, for

example, to approximately minimize the curvature of the spline. We describe in detail

how to formulate and solve the problem, as well as the problem of fitting parallel curves,

for a spline in Bernstein-B6zier form.















CHAPTER 1
INTRODUCTION

A channel is a fat curve of varying thickness that represents a contiguous opening

between obstacle regions as depicted in Figures 1-1 and 8-1. The challenge is to solve

the channel problem.

Channel problem. Given a channel, construct a spline of prescribed smoothness and

number of control points that traverses and stays strictly inside the channel.

Examples of channel problems are automated navigation, for example, piloting

a submarine through a narrow underwater canal; fitting piping, for example, thread-

ing piping past existing structures while minimizing kinks to decrease resistance to

flow; computing free pi,,1li\ for analyzing nano-structures; designing curved circuitry;

parametrizing cutter p/,,1/ i so that the cutting tool avoids obstacles and sudden acceler-

ation and deceleration; graph drawing, where graphs and networks have to be laid out

for better visualization. Many of these tasks are too large or time-constrained for human

intervention, say moving control points and visually checking for interference in the 2D

projections.

The channel problem can be trivial or extremely difficult depending on the smooth-

ness requirements and the number of pieces prescribed. On one hand, if the budget

is no concern and the curvature distribution and optimal smoothness are not crucial,

naive approaches work; for example, rounding off the piecewise linear channel center

curve, or using one higher-degree polynomial piece per channel segment and Hermite-

interpolating heuristically derived values at the channel breakpoints. On the other hand,

if the clearances are tight and few spline pieces are needed, the exact constraints of the

channel problem are nonlinear and continuous (also called infinite), in that we need

non-interference for every parameter value. Off hand, without additional structure, such





















(a) (b)

Figure 1-1: Channel Problem. (a) A narrow planar channel traversed by an approximately
curvature-minimizing planar spline. (b) A helical 3D channel (transparent, alternately
dark and light gray rendered) that is traversed by a space curve whose B6zier control
points are indicated as black squares.


problems do not have a bounded complexity and are not tractable algorithmically. In

our approach, we deal with tight clearances and few pieces by approximating the exact

contraints. We approximate safely from one side so that our output is certified to be a

solution. In the process, we will miss solutions, but only solutions that an a posteriori

test, based on the same tight bounding constructs, would also not be able to certify as

solutions.

Since continuous, nonlinear optimization is known to be difficult, we need only

elaborate on the second claim that a trial-and-error approach with automatic refinement

of the spline will likely

generate many more spline control points than necessary, and hence increase the
cost for downstream processing, and

introduce unnecessary oscillations into the spline path.

Moreover, the cost of checking non-interference is not negligible and comes with the

same trade-off: less sophisticated tests are faster but yield poorer results in the number

of pieces and quality of the resulting curve. Figure 1-2 illustrates this point with an

approach that would, at first sight, appear to be "reasonably ok in practice." The steps

are: generate points on the central axis of the channel, construct an interpolating spline





























Figure 1-2: A naive approach to the channel problem: spline interpolation of the chan-
nel center line with an increasing number of curve pieces. The rightmost channel shows
additionally the cubic spline control polygon. The arrow indicates that the spline control
polygon does not stay inside the channel and therefore still cannot certify that the curve
lies inside the channel.

curve, test for interference and refine or coarsen. There are many possible interpretations

of this general recipe and possibly one that works better than the specializations we tried.

The examples in Figure 1-2, use chord-length parametrization, Matlab's cubic spline

routine and uniform refinement. After two refinements, the 12 polynomial pieces of the

curve visually fit into the channel. But the spline control polygon does not lie inside. That

means that a control-point based test, such as checking the convex hull, would report

interference and trigger a third refinement. Also note the oscillations in the spline. The

strategy proposed in this paper returns the single polynomial curve piece sketched in

Figure 1-3 below and shown in detail in Figure 7-1, page 23. The solution process also

cL 'iilfn.% that the curve lies in the channel.

Our approach to solving the channel problem is to construct a (piecewise linear)

sleeve around a candidate space curve; then it is sufficient to constrain this sleeve rather

than the original nonlinear curve to stay within the channel as illustrated in Figure 1-3.









Carefully formulated, this approximation results in a linear feasibility problem that is

solvable as a Linear Program, say by the simplex method. (An alternative formulation, as

semi-definite programming problem, will not be considered here.) A solution to the linear

feasibility problem solves the original problem and, due to the tightness of the sleeve

that we use, only solutions with very low clearance are missed. The missed solution

curves are exactly those that also the a posteriori intersection test, based on piecewise

linear enclosure of the curve with the same granularity, would miss. (Note that testing

intersection with Newton's method would only be safe if we used interval arithmetic

[7]. Efficient interval arithmetic, in turn, depends on tight piecewise linear enclosures.)

That is, a solution curve that would be missed by the proposed approach would also be

declared "potentially intersecting" by an a posteriori test of the same granularity.

While the channel problem only asks for a feasible curve, we can add optimality

and uniqueness by augmenting the feasibility problem with a linear (or quadratic)

optimization function. The result is the standard linearly constrained minimization

problem:

min f(b) subject to linear equality and inequality constraints.

The structure of the paper is as follows.

In Section 2, we review and select a sleeve.

In Section 3, we define spline, sleeves and parameterization.

In Section 4, we list the constraints in full detail.

In Section 5, we add an objective function.

In Section 6, we specialize the setup to 2D and parallel curve problems.

In Section 7, we illustrate the approach with several examples.























curve in sleeve


c'II'\L' I in cfhnnlC


Figure 1-3: The basic idea of our solution to the Channel problem. Given the (simple 2D)
channel (a), a piecewise linear enclosure or sleeve for a candidate curve is constructed (b)
and the problem is solved by fitting the sleeve into the channel (c).


chann el















CHAPTER 2
BOUNDING CONSTRUCTS AND RELATED WORK

Construction of a sleeve around the spline curve is equivalent to enclosing the spline

curve with linear pieces. However, in the channel problem, the coefficients of the spline

curve are unknown and sought as the solution of the feasibility problem. Therefore one

would like the enclosure to have three properties.

1. The enclosure should depend linearly on the coefficients of the spline representa-
tion.

2. The enclosure should be as narrow as possible.

3. The enclosure should be refinable to adaptively adjust to where the channel is
particularly narrow or tricky to navigate.

The literature offers many choices of enclosures or bounding constructs that could in

principle be used to construct a sleeve (Figure 2-1). However, requirement 1 rules out

oriented bounding boxes and convex hull based approaches, or building a local coordinate

system and bounding box in the normal direction [10]. In fact, Figure 7-1 illustrates

that these enclosures are not sufficiently narrow even for simple channels. Requirement

2 rules out the use of even looser bounding constructs such as bounding spheres and

axis-aligned bounding boxes. The best match of linearity, tightness and refinability for the

channel problem are the enclosures developed in Lutterkort [12] and Peters and Wu [15].






Figure 2-1: Enclosures based on control points: (from left to right:) cubic curve with
control polygon, axis-aligned box, bounding circle, Filip [5] (scaled by 1/2), bounding el-
lipse [18], convex hull and 8-dop [1, 8, 9], oriented bounding box [6], fat arc [16], 3-piece
slefe [15].









channel
c-segment
4 cross-section normal normal


J ^ normal normal



(a) (b)

Figure 2-2: Components of a channel. (a) An entire helix-shaped channel viewed from
the top. (b) A close-up view of two c-segments with the front cross sections emphasized
by thick lines.


However, even these require a smart formulation to reduce the problem to the standard

linearly constrained minimization problem.

For functions in one variable, a channel problem was formulated in Lutterkort [11].

However, for functions, as opposed to free-form curves, the problem is much simpler

since the parametrization is fixed and "above" and "below" make sense. Another closely

related class of problems appears in graph drawing [3, 17]. There, however, the emphasis

is on a large number of piecewise linear curves with few pieces.















CHAPTER 3
MODELING THE PROBLEM

We treat both the spline and the channel as a sequence of N pieces (Figure 2-2),

one to one matching each channel piece with one spline piece. A spline piece is one

polynomial piece, but a channel piece can consist of n, segments. That is, one spline

piece can be threaded through a longer stretch of the channel. Each spline piece is

enclosed by the n, segments of its enclosing sleeve.

Since we are dealing with parametrized space curves, we need to create a correspon-

dence of spline pieces with the channel. We could do this by explicitly matching spline

parameters to channel parameters (i.e., traversing in lockstep). The other extreme is to al-

low any piece of the spline to be associated with any piece of the channel. The first option

is convenient for implementation since it simplifies the constraints. However, we found

that it is too restrictive: good solutions were not found. The drawback of the second so-

lution is not only that we need to check every breakpoint against every channel segment,

but also that the curve can turn back onto itself. We avoid both extremes by matching

pieces, specifically, associating the break points of the sleeve with specific channel

segments. This allows working locally and prevent multiple traversal of segments.

In the next two subsections, we define the channel and the sleeve in detail so that we

can formalize the correspondence of in Section 4.

3.1 Channel Definition

Each channel piece, or c-piece, is a sequence of cross-sections. A cross-section has

a edges. For example, in Figure 2-2, each cross-section is quadrilateral (i.e., a = 4). The

vertices need not be co-planar. Adjacent cross-sections span a channel segment, short

c-segment. The a faces of the c-segment are split into triangles with normals consistently

oriented outwards. In Figure 2-2 (a), each c-piece consists of two adjacent c-segments.









The cross-sections (and hence the channel segments) do not have to be convex.

However, the formulated constraints will force the curve through the (convex) intersection

of all the halfspaces defined by the facets of the channel segment.

In our implementation, the faces are triangulated using the same pattern to simplify

the channel representation and a is constant; but the channel can be designed with

different values of a at every cross-section and the triangulation can be arbitrary with

consistent normals.

3.2 Spline Definition

For simplicity, we represent the space curve in B6zier form; it is not difficult to use

a b-spline representation instead. A polynomial b of degree d with respect to the interval

[0..1] can be written in terms of the B6zier basis functions B'f(t) as:

d (t), dAt) d t)-tt

t=o 0

where the be are the control points. If be = (be,,, be,,, bt,z) is a three-dimensional control

point then b(t) = (b,(t), by(t), b (t)).

3.3 Slefe Definition

Our method is based on slefes (slefe is short for: subdividable linear efficient

function enclosure, and is pronounced like sleeve) developed in Lutterkort [12], Peters

[13], and Peters and Wu [15]. For polynomials of degree d in B6zier form, the upper and

the lower boundary of the slefe are a linear combination of piecewise linear functions ZTd

and a i = 1,..., d 1 (see Equation 4.1 or 3.1 below). Specific ad and a have been

tabulated for various combinations of d and n, and are available for download [19].

Since slefes are a relatively new construct, we give some background in the next

paragraph. This information is not necessary to use slefes in the context of this paper, but

may be of interest to some readers.









The functions af and aj bound a specific polynomial ad of degree d from above and

below fort E [0..1]:

ad (t) < a ~t) < -jid(t).

The B6zier coefficients of af, after scaling by the negative number 1- d- 2 are

(Figure 3-1 for d = 5 and i = 2)

0 i-1 (i d-i d i-1 1 0
i'i' i i d-i d-i d-i d-i

It is easy to check, that af is uniquely defined by the constraints









Figure 3-1: B6zier coefficients of a'.




af (0) af(1) 0, Djaj = e where Djb := bj-_ 2bj + bj+i.
0 else

For degree d = 3, af has the coefficients 0, -2/3, -1/3, 0 and ad(t) af(1 t) so that
1a D2a [ 01]. Since there are only few af and these polynomials are independent
Diad D 0 1 o ai poyoil independent
of the spline pieces b, the narrowest enclosures have been pre-computed and tabulated

once and for all for various n,: the tables simply contain the values of a and ia at n, + 1

(equally spaced) breakpoints.

The functions ad, af are weighted by the second differences Dib and the result is

added to the linear interpolant 1(b) := (1 t)bo + tbd of the end points. (In general, say

for a spline in B-spline form, 1(b) can be chosen as any piecewise linear approximation,

for example the control polygon.) That is, on the interval [0..1],


e > b(t) > e


(3.1)










spline segment e



(slefe)
e-segment





Figure 3-2: An ne=3-piece slefe with upper boundary e and lower boundary e. The four
B6zier control points of the cubic piece are shown as squares.


where


e = 1(b) + Eia -f min {0, Db} + ? max{O0, Db}

S:1(b) + yEfi1 ai max{0, Db} + af min{0, Dib}.


Note that e and e are piecewise linear since 1(b), ad and a' are, but that e and e do not

linearly depend on the coefficient bi due to the min and max selections. However, with

care, we will still be able to formulate the expressions as linear inequality constraints in

Section 5. Also note that either min{0, Djb} = 0 or max{0, Djb} = 0 so that e has only d

summands.

We observe in practice that only little is lost by fitting a slefe inside the channel

rather than a spline inside the channel since the tables recording the breakpoint values of

ad and ~d have been pre-optimized. Peters and Wu [14] show that for any convex cubic

piece b, the ratio between the tightest possible sleeve for b and the slefe e and e of b is

always less than 1.07.

3.4 Sleeve Definition

Conforming to the segmentation of the channel, the slefe of each polynomial piece

is called an enclosure or e-piece (Figure 3-2). Each linear segment in the e-piece is an









t= 0 1/3 2/3 1
1a" -.0695214343 -.4398918047 -.3153515940 -.0087327217
74 0 -.3703703704 -.2962962963 0
Table 3-1: Slefes a! and -j of the basis a'.


e-segment and there are n, e-segments per e-piece. With v E {x, y} for a planar curve or

v E {x, y, z} for a spatial curve, e-pieces are defined in the following terms.

b6,, is the v-component of the fh B6zier control point of the pth polynomial piece

of the solution spline curve. bP, (note the gap in the subscript) is the vector

whose (th entry is b,,.

1(11) is the linear interpolant of the first and last control points of the pth polyno-

mial piece in the solution.

(P and eg are the the upper and lower e-pieces, respectively, of the pth polynomial piece

for the vth coordinate.

D i'" is the ith second difference of the B6zier coefficients of b"(t):
Djf := b 2bP +b1.

The vth coordinate of D i'" is denoted by D 0',, and

DbP, is the vector of the d 1 second differences of b,.

ad and Ead are matrices of size n, + 1 x d 1 whose ith column lists the values of the

lower, respectively upper slefe of af at (s/ne)s=o,...,ne. These values have

been tabulated [19]. Table 3-1 shows the slefe bases a' and aj; and the table

for i = 2 is mirror symmetric since a|(1 t) = a'(t).

3.5 Correspondence of the Channel and the Spline Enclosure

We parametrize the channel and the slefe so that we can locally associate c-segments

with e-segments and vice versa. The start parameter of each (c- or e-) piece is t = 0 and

the end parameter is t = 1. The internal parameters increase uniformly with the index

as illustrated in Figure 3-3 (b). Let vi be a breakpoint (on the cth cross section of the

pth piece) of the channel. Then is its per-piece, local parameter. Let s := [c01] be













Vo',IP nori, [1]-








[1/4]
(1/3)

[0]

S(0)
(a) (b)

Figure 3-3: Parametrization and correspondence for geometric constraints (3a) and
(3b). The boxes at each enclosure breakpoint represent the 2dim=8 possible choices for
SCLP ZP \ P x \ P P


the smallest integer larger than c". Then e^ is the sleeve's breakpoint with the smallest

parameter such that J- > (i.e., with a parameter just to the right of &). We define the

point on the sleeve corresponding to vi as


S:= + (1 u)e where u:= s c-. (3.2)
n,

For example, Figure 3-3 (b) (see also Figure 4-1 (b)), shows the fractional parameters

of the c-piece in parentheses and the parameters of the corresponding e-piece of the

sleeve in brackets for n, = 4, n, = 3, c = 2, and s = Fc(4/3)] = [8/3] = 3. Then

u = s c(4/3) = 1/3 yields eP = (e"I + 2e )/3.















CHAPTER 4
THE CONSTRAINT SYSTEM

We can now formulate the 3D channel problem as a linearly constrained feasibility

problem for fitting a degree d spline with N polynomial e-pieces through a channel with

N c-pieces. The following subsections make each of the constraints precise:

(1) Min-max selection of second differences.

(2) Channel correspondence and smoothness of the spline.

(3a) Slefe comers are in the channel.

(3b) Channel comers are outside the sleeve.

(3c) Slefe segment is inside the channel segment.

The constraints apply to pieces p, coefficients differences i, and coordinates v:


p= ,...,N, i 1...,d-1, f= 0...,d, v G{x,y,z}.


4.1 Min-Max Selection

Our first challenge is to formulate the min and max selection as linear qualities and

inequalities. To this end, we define, in addition to the unknown coefficients


6^, the auxiliary variables D 1"', D 10' and DjbPj.

That is, we have a total of N x (3(d 1) + d + 1) x dim scalar-valued unknowns,

where dim = 3 for a space curve and dim = 2 for a planar curve. The name Djf,

for a single, scalar unknown is somewhat lengthy, but it is precise and would appear in

code as dbm[p,i,v]. D 1'" will play the role of min{0, D i'",} and D i'I' will stand in for

max{0, D i0'',}. That is, for p = 1..N, i = 1..(d 1) and v E {x, y, z} we will compute a









sleeve eP and ec


PV :=() + E f i' ? ZD i' (4.1)

:= (b) + E fiD +'' 7D i (4.2)

such that



The constraints are as follows.

(1) Min-max selection of second differences: (dim x N x (d 1) x 3) constraints

D i' > Di'", and D 1i' > 0 and D Di DiD

where D /,:= _I 2 +>, + bj.

This implies D < D /', and D /'_ < 0 and that, for some e,, > 0,


Di := min{0, D i',} c, and D i' := max{0, D /"', }+ ,.


Therefore e, = F + E ( adf) > and ef < Le as claimed. That is, we

are potentially fitting a wider sleeve than the slefe into the channel. This is the correct

inclusion since fitting the wider sleeve guarantees that the narrower slefe of the solution

curve fits; this, in turn, implies that the solution curve fits into the channel. In fact, the

objective function discussed in Section 5 will drive the sum of the ep, to zero.

4.2 Correspondence and Smoothness

Like all linear equality constraints, the next set of constraints could be eliminated

by substitution. The first constraint prevents a curve piece from freely sliding to another

c-segment (see also (3c) below).

(2) Correspondence and Smoothness: ((3N 2) x dim) constraints

bYO = center of the starting cross-section of the pth piece.

CO continuity: b = +

C1 continuity: b, (b ,, + .










......... channel
normal- slefe
normal _

(1/3) (2/3) (1/3)
--0 -- ------- ,-- -
(0) .--- [1/2] P 7 (0) normal D

>ie ^ "



[0] 1] [0] (2/3) [1]
(a) (b)

Figure 4-1: Geometric constraints (3a) and (3b). Lateral cross-section view of channel
violations to be prevented: (a) a slefe breakpoint could pierce a channel segment, or (b) a
channel breakpoint could pierce the slefe.


Additional constraints that can be expressed as linear qualities or inequalities, such as

C2 continuity, can be just as easily added to the system.

4.3 Interference Checks

The remaining constraints combine the x, y, and z components to ensure that the

curve stays inside the channel. Here the piecewise linear nature of c, and T, pays off. For

e,v E {(,,,, T,}, let ep := (ePx, eP, e,,) be one of 2dim possible combinations of upper

or lower slefe breakpoints for a given s (cf. Figure 3-3 (a)).

Using the parametric correspondence of Section 3.5, we can test the sign of the

signed volume of tetrahedra with one point on the e-piece and a corresponding channel

triangle as base. Equivalently, we can compute the sign of the inner product of the

triangle's normal with the edge pointing from any of the three vertices of the triangle to

the point on the e-piece. Specifically, by keeping e inside the corresponding channel

segment, Constraint (3a) and (3c) below makes sure that the sleeve does not pierce the

channel. Conversely, Constraint (3b) makes sure that the channel does not pierce the

sleeve. The number of constraints can be reduced by only testing concave, inward-

pointing breakpoints of the channel. Both in (3a) and (3b), normalP is the outward-









pointing channel normal. Note that the constraints depend on bP via Equation 4.1 on

page 15.

(3a) Slefe comers in the channel: (2dim x 2a x N x (n, + 1)) constraints

For each piece and segment, for each e where e {ey,, ct} and every triangle

of the corresponding c-segment, choose any vertex vP of the triangle to form the

constraint (cf. Figures 3-3 (a) and 4-1 (a))


normalP (e" vI) < 0.


(3b) Channel comers outside the sleeve: (2dim x 4a x N x (n, + 1)) constraints

At each channel cross-section, for every triangle on the two adjacent c-segments

connected at the cross-section, choose any vertex Ov on the triangle and the point e"

on the sleeve defined by Equation 3.2, page 13 and enforce (cf. Figures 3-3 (b) and

4-1 (b))

normalP ( e v) < 0.

By constraining one interior point := ue _S + (1 u)e of the line segment from

e1_, to e to lie in both (extended) channel segments, (3b) actually enforces that the

whole segment lies inside the channel, provided e1_, and e^ do. This is remarkable since

testing to which side of a facet of the sleeve the point v lies (in order to rule out that it

pierces the sleeve) is off-hand not linear in the unknowns: it is a constraint on the sign

of the signed volume of the tetrahedra where three points lie on the unknown sleeve and

the fourth point is Ov. Effectively, the formulation (3b) reduces a nonlinear to a linear

constraint!

There is one final consideration: Constraint (3a) only confines e to the tunnel-like

intersection of the halfspaces forming the corresponding c-segment. We still need to cap

off this tunnel to prevent overshooting, as illustrated in 2D in Figure 4-2 (a). That is, a

slefe breakpoint could satisfy (3a) but lie outside the channel. The planes of the next and

previous c-segment that cap off the tunnel are those whose normal forms a sharp angle













/ capping plane


s+1 Y +1
(a) (b)

Figure 4-2: Overshooting (prevented by capping half-spaces in Constraint (3c)).


with the lateral, non-cross-section edges of the c-segment oriented from s 1 to s. At the

8th cross-section, the normals must be nearly aligned with the oriented lateral edges; at

the s 1st cross-section they must be nearly opposite to the oriented lateral edges.

(3c) Slefe inside channel segment: (2dim x {2 + 2} x N x n,) constraints

For each e where e {e i, I ,} and every capping plane (with normal

normal) of the c-segment, choose any vertex vP in the capping plane to form the

constraint

normalP (ej vI) < 0.

We observe that for any curve violating (3c) there appears to be another feasible curve

with lower sum of absolute second differences (Figure 4-2 (b) without the loop) that can

be obtained by purely local operations. Given our choice of objective function in Section

5 below, this explains why we have never observed Constraint (3c) taken on.















CHAPTER 5
THE OBJECTIVE FUNCTION

The standard Linear Program has the form


min f (b), subject to linear equality and inequality constraints.


The previous section listed the constraints (1,2,3a,3b,3c) and we may add an objective

function f. (If there is no objective function, then the problem is called a linear feasibility

problem.) A possible choice for f is to minimize the sum of the absolute second-

differences, penalizing loops and oscillations. Since D 1'' > 0, D 1'- < 0, and

D i' Dib = D 0'",, we have that D /'i D 1' is minimal if one of D i''1 and

D i' is zero and the other equals D 0'', or, equivalently, |D i'", = D 1' D 1'.

Hence, to minimize kinks, we choose the objective function

N d-1
>E SD' D .-D
p=1 i=1 vC{x,y,z}

This problem can now be handed to a standard linear constraint solver, say solvers that

use the interior point method or the simplex method. If the problem has no solution, some

solvers return an answer minimizing infeasibility and a list of violated constraints. This

indicates the location where to increase the degree d or the number of slefe segments ne,

or to decrease the number of channel segments n, per piece.















CHAPTER 6
PLANAR CHANNELS AND PARALLEL CURVES

A 2D channel has an upper and a lower piecewise linear boundary (with normals

oriented outwards). The slefe stays within such a planar channel if we enforce a simpli-

fied version of (3a) and (3b). We arbitrarily name one channel boundary "upper" and the

other "lower," normUjij1 'f and normLowerP their normal and "v i and lowerP their

respective breakpoints. Then (3a) and (3b) become


normUj.l i' (eg I'I.I IIU) < 0, normLowerP (e lowerP) < 0,

normUj. 1 (ep I'Ij.I I I) < 0, normLowerP (e' lowerP) < 0.


The formulation of the 2D problem can be adapted to thread multiple parallel

curves through a channel. For example, to thread two parallel curves, width w apart, the

constraints for the upper channel change to


normUl'j'. K'* 1e~ "Ij'l I) < w, normUl'j' (e- -j ifl < w.


This results in a spline solution pi (t) with a buffer distance of w between the curve and

the upper channel. Since (w normUji'j .) normUi'' i ,' = w, this is effectively

equivalent to narrowing the channel by w. Then, a second curve I-_(t) := pi(t) + wn(t)

can fit through the channel, where n(t) is the normal at pi (t) oriented toward the upper

channel. Since P2 is an offset curve, it is in general not polynomial [4]. Moreover,

offset curves are smooth only if w is smaller than the smallest radius of curvature of pi;

otherwise self-intersections have to be trimmed off and smoothed out. Of course w could

also be chosen as w(t) with a varying, but prescribed value.
























(a) (b)

Figure 6-1: Two parallel planar curves traversing channels. (a) A spline and its offset
avoiding an inner and an outer channel boundary. (b) A channel with long sections and
sharp turns with detail enlarged.















CHAPTER 7
EXAMPLES

The examples throughout the paper were run on a Pentium 4 2.4GHz with 512

MB RAM using the freely available open-source PCx [2] linear constraint solver. The

constraints were automatically generated by a script on input of the channel vertices.

Figure 7-1 demonstrates that a fit based on bounding the control polygon would not

be able to generate our tight solutions to the channel problem even after subdivision.

The channel in Figure 7-2 (a) consists of twelve c-segments. To accommodate the

sharp turns while maintaining C1 continuity, we chose n, = 1 (i.e., one polynomial per

c-segment). Formulated in 3D (the channel has "depth" perpendicular to the viewing

direction), the problem was solved in 0.24 seconds.

Both Figure 2-2 (b) and Figure 7-2 (b) consist of twenty segments. The solution

spline is of degree d = 4, n, = 2 and one polynomial piece fits each pair of c-segments.

The solution time varies with the narrowness of the channel: 2.64 seconds for the left and

3.42 seconds for the right example in Figure 7-2.

The final example is Figure 8-1. Here a safe, smooth path for a (0.96-unit wide)

robot is computed. The top-left image shows the obstacles. As a first step, an channel is

traced through the obstacles so that our path-fitting method can be applied. The bottom-

left shows the spline path fit through the channel maintaining a 0.48-unit buffer on either

side. The bottom-right shows the robot at equal parameter increments traversing the

environment.



























(a) (b)

Figure 7-1: Solution curve for a 2D channel. The B6zier control points are indicated as
black squares. (a) The control polygon of the solution lies well outside the channel al-
though the slefe fits within. (b) Also after subdivision, the control polygon of the solution
exceeds the channel boundaries.





















(a) (b)

Figure 7-2: Channel solutions. (a) A 2D channel with 1 c-segment per c-piece. (c-pieces
alternate in color). There is one piece of degree 3 per c-piece. (b) A 3D channel with two
c-segments per c-piece. The spline curve is of degree 4.















CHAPTER 8
SUMMARY

The sleeve-based approach may be viewed as bridging a gap between techniques

of computational geometry and geometric design since we tightly link linear discrete

with non-linear continuous representations. While the constraints appear at first sight

complex, they are all necessary to guarantee correctness while allowing for a wide range

of solutions with flexible parametrization within each segment for parametric space

curves. Although costlier than naive approaches, the overall optimization framework

has the advantage of providing an objective function to pick solutions with preferred

properties.













AZT
(a)
.7


ENTER


(c) (c)


Figure 8-1: Robot path finding. (a) Robot faced with obstacles. (b) Abstraction of the
problem by defining a channel. (c) Solution of the channel problem (with offsets). (d)
Robot path (black, smooth curve).


'I















REFERENCES


[1] A. Crosnier and J. R. Rossignac. Technical section tribox bounds for three-
dimensional objects. Computers and Graphics, 23(3):429-437, June 1999.

[2] Joe Czyzyk, Sanjay Mehrotra, Michael Wagner, and Stephen Wright (1997). PCx:
Software for linear programming. http://www-fp.mcs.anl.gov/otc/Tools/PCx.
Accessed July 2004.

[3] D. Dobkin, E.R. Gansner, E. Koutsofios, and S.C. North. A path router for graph
drawing. In Proceedings of the 14th annual symposium on Computational Geom-
etry, pages 415-416. ACM Press, New York, 1998. June 1-10 1998, Minneapolis,
MN.

[4] R. T. Farouki and T. Sakkalis. Pythagorean hodographs. IBM Journal of Research
and Development, 34(5):736-752, September 1990.

[5] D. Filip, R. Magedson, and R. Market. Surface algorithms using bounds on
derivatives. Computer Aided Geometric Design, 3(4):295-311, 1986.

[6] Stefan Gottschalk, Ming Lin, and Dinesh Manocha. OBBTree: A hierarchical
structure for rapid interference detection. In Proceedings of the ACM Conference on
Computer Graphics, pages 171-180, New York, August 4-9 1996. ACM.

[7] Jon Rokne H. Ratschek. Geometric computations with interval and new robust
methods: with applications in computer graphics, GIS and computational geometry.
Horwood Publishing, Chichester, 2003.

[8] Timothy L. Kay and James T. Kajiya. Ray tracing complex scenes. In David C.
Evans and Russell J. Athay, editors, Computer Graphics (SIGGRAPH '86 Proceed-
ings), volume 20, pages 269-278, August 1986.

[9] James T. Klosowski, Joseph S. B. Mitchell, Henry Sowizral, and Karel Zikan.
Efficient collision detection using bounding volume hierarchies of k-DOPs. IEEE
Transactions on Visualization and Computer Graphics, 4(1):21-36, January 1998.

[10] Leif Kobbelt, Katja Daubert, and Hans-Peter Seidel. Ray tracing of subdivision
surfaces. In Rendering Techniques '98 (Proceedings of the Eurographics Workshop),
pages 69-80, New York, June 1998. Springer-Verlag.

[11] D. Lutterkort and J. Peters. Smooth paths in a polygonal channel. In Proceedings
of the 15th Annual Symposium on Computational Geometry, pages 316-321, Miami
Beach, Florida, 1999.









[12] David Lutterkort. Envelopes for nonlinear geometry. PhD thesis, Purdue University,
May 2000.

[13] J. Peters. Efficient one-sided linearization of spline geometry. In R.R. Martin, editor,
Mulliu mii v of Surfaces X, pages 297-319. IMA, 2003.

[14] J. Peters and X. Wu. On the optimality of piecewise linear max-norm enclosures
based on slefes. In Proceedings of the 2002 St Malo Conference on Curves and
Surfaces, pages 335-344, St Malo, France, 2002.

[15] J. Peters and X. Wu. Sleves for planar spline curves. Computer Aided Geometric
Design, 21(6):615-635, 2004.

[16] Thomas W. Sederberg, Scott C. White, and Alan K. Zundel. Fat arcs: A bounding
region with cubic convergence. Comput. Aided Geom. Design, 6:205-218, 1989.

[17] Roberto Tamassia. Graph drawing. In J.-R. Sack and J. Urrutia, editors, Handbook
of Computational Geometry. Elsevier, North-Holland, Netherlands, 2000.

[18] E. Welzl. Smallest enclosing disks (balls and ellipsoids). In Hermann Maurer,
editor, Proceedings of New Results and New Trends in Computer Science, volume
555 of LNCS, pages 359-370, Berlin, Germany, June 1991. Springer.

[19] X. Wu and J. Peters (2002). SubLiME subdividablee linear maximum-norm enclo-
sure) package. http://www.cise.ufl.edu/research/SurfLab/download/SubLiME.tar.gz.
Accessed July 2004.















BIOGRAPHICAL SKETCH

I was born in 1980 in a town called Varanasi in North India. I was brought up in

New Delhi, India's capital, til I was about 10. After living two years in Oman, and an

additional two in South India, I flew across the world to Orlando, Florida, on Feb 1,

1994. Here, I attended my high school and endured the intensity of the International

Baccalaureate program. I entered the University of Florida in 1998 as an undergraduate

and published my first paper in ACCV 2002 on wheelchair tracking. I continued here for

my MS with a focus in computational geometry and I will be graduating this summer,

2004.