UFDC Home  myUFDC Home  Help 



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 CCR9901894 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 MinMax 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 11 Channel problem . . . . . . . 1 12 A naive approach to the channel problem . . . . 3 13 The basic idea of our solution to the Channel problem . . 4 21 Enclosures based on control points ...... . .. . 6 22 Components of a channel . . . . . ... 7 31 B6zier coefficients of a ................... . 10 32 An ne=3piece slefe with upper boundary Te and lower boundary e . 11 33 Parametrization and correspondence for geometric constraints (3a) and (3b) 13 41 Geometric constraints (3a) and (3b) . . . ....... . 16 42 Overshooting (prevented by capping halfspaces in Constraint (3c)). 18 61 Two parallel planar curves traversing channels. . . 20 71 Solution curve for a 2D channel . . . .... .. 23 72 Channel solutions . . . . . . . 23 81 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, twosided, 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 BernsteinB6zier 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 11 and 81. 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 nanostructures; 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 timeconstrained 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 higherdegree 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 noninterference for every parameter value. Off hand, without additional structure, such (a) (b) Figure 11: Channel Problem. (a) A narrow planar channel traversed by an approximately curvatureminimizing 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 trialanderror 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 noninterference is not negligible and comes with the same tradeoff: less sophisticated tests are faster but yield poorer results in the number of pieces and quality of the resulting curve. Figure 12 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 12: 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 12, use chordlength 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 controlpoint 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 13 below and shown in detail in Figure 71, 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 13. 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 semidefinite 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 13: 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 21). 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 71 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 axisaligned 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 21: Enclosures based on control points: (from left to right:) cubic curve with control polygon, axisaligned box, bounding circle, Filip [5] (scaled by 1/2), bounding el lipse [18], convex hull and 8dop [1, 8, 9], oriented bounding box [6], fat arc [16], 3piece slefe [15]. channel csegment 4 crosssection normal normal J ^ normal normal (a) (b) Figure 22: Components of a channel. (a) An entire helixshaped channel viewed from the top. (b) A closeup view of two csegments 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 freeform 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 22), 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 cpiece, is a sequence of crosssections. A crosssection has a edges. For example, in Figure 22, each crosssection is quadrilateral (i.e., a = 4). The vertices need not be coplanar. Adjacent crosssections span a channel segment, short csegment. The a faces of the csegment are split into triangles with normals consistently oriented outwards. In Figure 22 (a), each cpiece consists of two adjacent csegments. The crosssections (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 crosssection 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 bspline 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 threedimensional 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 31 for d = 5 and i = 2) 0 i1 (i di d i1 1 0 i'i' i i di di di di It is easy to check, that af is uniquely defined by the constraints Figure 31: 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 precomputed 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 Bspline 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) esegment Figure 32: An ne=3piece 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 preoptimized. 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 epiece (Figure 32). Each linear segment in the epiece is an t= 0 1/3 2/3 1 1a" .0695214343 .4398918047 .3153515940 .0087327217 74 0 .3703703704 .2962962963 0 Table 31: Slefes a! and j of the basis a'. esegment and there are n, esegments per epiece. With v E {x, y} for a planar curve or v E {x, y, z} for a spatial curve, epieces are defined in the following terms. b6,, is the vcomponent 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 epieces, 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 31 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 csegments with esegments 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 33 (b). Let vi be a breakpoint (on the cth cross section of the pth piece) of the channel. Then is its perpiece, local parameter. Let s := [c01] be Vo',IP nori, [1] [1/4] (1/3) [0] S(0) (a) (b) Figure 33: 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 33 (b) (see also Figure 41 (b)), shows the fractional parameters of the cpiece in parentheses and the parameters of the corresponding epiece 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 epieces through a channel with N cpieces. The following subsections make each of the constraints precise: (1) Minmax 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...,d1, f= 0...,d, v G{x,y,z}. 4.1 MinMax 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 scalarvalued 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) Minmax 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 csegment (see also (3c) below). (2) Correspondence and Smoothness: ((3N 2) x dim) constraints bYO = center of the starting crosssection 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 41: Geometric constraints (3a) and (3b). Lateral crosssection 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 33 (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 epiece 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 epiece. 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 csegment, choose any vertex vP of the triangle to form the constraint (cf. Figures 33 (a) and 41 (a)) normalP (e" vI) < 0. (3b) Channel comers outside the sleeve: (2dim x 4a x N x (n, + 1)) constraints At each channel crosssection, for every triangle on the two adjacent csegments connected at the crosssection, 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 33 (b) and 41 (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 offhand 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 tunnellike intersection of the halfspaces forming the corresponding csegment. We still need to cap off this tunnel to prevent overshooting, as illustrated in 2D in Figure 42 (a). That is, a slefe breakpoint could satisfy (3a) but lie outside the channel. The planes of the next and previous csegment that cap off the tunnel are those whose normal forms a sharp angle / capping plane s+1 Y +1 (a) (b) Figure 42: Overshooting (prevented by capping halfspaces in Constraint (3c)). with the lateral, noncrosssection edges of the csegment oriented from s 1 to s. At the 8th crosssection, the normals must be nearly aligned with the oriented lateral edges; at the s 1st crosssection 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 csegment, 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 42 (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 d1 >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 selfintersections 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 61: 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 opensource PCx [2] linear constraint solver. The constraints were automatically generated by a script on input of the channel vertices. Figure 71 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 72 (a) consists of twelve csegments. To accommodate the sharp turns while maintaining C1 continuity, we chose n, = 1 (i.e., one polynomial per csegment). Formulated in 3D (the channel has "depth" perpendicular to the viewing direction), the problem was solved in 0.24 seconds. Both Figure 22 (b) and Figure 72 (b) consist of twenty segments. The solution spline is of degree d = 4, n, = 2 and one polynomial piece fits each pair of csegments. 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 72. The final example is Figure 81. Here a safe, smooth path for a (0.96unit wide) robot is computed. The topleft image shows the obstacles. As a first step, an channel is traced through the obstacles so that our pathfitting method can be applied. The bottom left shows the spline path fit through the channel maintaining a 0.48unit buffer on either side. The bottomright shows the robot at equal parameter increments traversing the environment. (a) (b) Figure 71: 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 72: Channel solutions. (a) A 2D channel with 1 csegment per cpiece. (cpieces alternate in color). There is one piece of degree 3 per cpiece. (b) A 3D channel with two csegments per cpiece. The spline curve is of degree 4. CHAPTER 8 SUMMARY The sleevebased approach may be viewed as bridging a gap between techniques of computational geometry and geometric design since we tightly link linear discrete with nonlinear 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 81: 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):429437, June 1999. [2] Joe Czyzyk, Sanjay Mehrotra, Michael Wagner, and Stephen Wright (1997). PCx: Software for linear programming. http://wwwfp.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 415416. ACM Press, New York, 1998. June 110 1998, Minneapolis, MN. [4] R. T. Farouki and T. Sakkalis. Pythagorean hodographs. IBM Journal of Research and Development, 34(5):736752, September 1990. [5] D. Filip, R. Magedson, and R. Market. Surface algorithms using bounds on derivatives. Computer Aided Geometric Design, 3(4):295311, 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 171180, New York, August 49 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 269278, August 1986. [9] James T. Klosowski, Joseph S. B. Mitchell, Henry Sowizral, and Karel Zikan. Efficient collision detection using bounding volume hierarchies of kDOPs. IEEE Transactions on Visualization and Computer Graphics, 4(1):2136, January 1998. [10] Leif Kobbelt, Katja Daubert, and HansPeter Seidel. Ray tracing of subdivision surfaces. In Rendering Techniques '98 (Proceedings of the Eurographics Workshop), pages 6980, New York, June 1998. SpringerVerlag. [11] D. Lutterkort and J. Peters. Smooth paths in a polygonal channel. In Proceedings of the 15th Annual Symposium on Computational Geometry, pages 316321, Miami Beach, Florida, 1999. [12] David Lutterkort. Envelopes for nonlinear geometry. PhD thesis, Purdue University, May 2000. [13] J. Peters. Efficient onesided linearization of spline geometry. In R.R. Martin, editor, Mulliu mii v of Surfaces X, pages 297319. IMA, 2003. [14] J. Peters and X. Wu. On the optimality of piecewise linear maxnorm enclosures based on slefes. In Proceedings of the 2002 St Malo Conference on Curves and Surfaces, pages 335344, St Malo, France, 2002. [15] J. Peters and X. Wu. Sleves for planar spline curves. Computer Aided Geometric Design, 21(6):615635, 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:205218, 1989. [17] Roberto Tamassia. Graph drawing. In J.R. Sack and J. Urrutia, editors, Handbook of Computational Geometry. Elsevier, NorthHolland, 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 359370, Berlin, Germany, June 1991. Springer. [19] X. Wu and J. Peters (2002). SubLiME subdividablee linear maximumnorm 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. 