UFDC Home  myUFDC Home  Help 



Full Text  
FINDING INTERSECTION CURVES USING SUBDIVIDABLE LINEAR EFFICIENT FUNCTION ENCLOSURES By MINHO KIM 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 Minho Kim To my parents and my sister ACKNOWLEDGMENTS I would like to thank my advisor, Dr. Jorg Peters. He inspired me, guided me through all the research, and gave me invaluable advice, ii..i lions, and comments. This thesis never could have been done without his help. I also would like to show my gratitude to Dr. Anand Rangarajan and Dr. Paul A. Fishwick for serving on my committee. But most of all, members of my family deserve my deepest gratitude. They have always been on my side and cheered me up through my entire life. TABLE OF CONTENTS page ACKNOWLEDGMENTS ............ LIST OF FIGURES .............. ABSTRACT ................... CHAPTER 1 INTRODUCTION ............ 2 PREVIOUS WORK ............ 2.1 Overview ............... 2.2 Analytic Methods .......... 2.3 Lattice Evaluation Methods .. 2.4 Marching Methods ......... 2.5 Subdivision Methods ........ 3 BACKGROUND KNOWLEDGE ..... 3.1 SLEFE (Subdividable Linear Efficient Function Enclosure) 3.1.1 O verview . . . . . . 3.1.2 Theoretical Basis ................... 3.1.3 Width of the SLEFE ................ 3.1.4 Exam ple . . . . . . 3.1.5 Tensoring SLEFEs .. ................ 3.1.6 M idstructure . . . . . . 3.1.7 3.1.8 Extension to Curves and Surfaces Inverse of Midstructure ....... 4 PROCEDURE .................. ............. .. 18 4.1 Constructing Midstructures of Tensorproduct B6zier Surfaces .18 4.2 Finding the Intersection of Midstructures . . 19 4.2.1 Finding the Intersection of Two Triangles . ... 19 4.2.2 Finding the Topology of Piecewise Linear Intersection Curves 22 4.2.3 Inverting Pircewise Linear Curves to BSpline Curves .. 25 5 ANALYSIS .............. ................. 26 5.1 Evaluating an Exact Intersection ................. .. 26 5.2 Measuring Tolerance ............... ... .. 27 6 CONCLUSION AND FUTURE WORK ..... .......... 34 REFERENCES .............. ... ......... .... 35 BIOGRAPHICAL SKETCH ................ ... ......... 37 LIST OF FIGURES Figure page 31 Hat function. .............................. 12 32 SLEFEs of al with its control points. ................ 14 33 Example of midstructure. .................. .... .. 16 34 Bounding boxes of SLEFEs at break points. . . ..... 17 41 Intersection of triangle and line segment. .. . . ...... 19 42 Making triangle edges exclusive of each other. . . 22 43 Degenerate cases of triangletriangle intersection. . . ... 23 44 Constructing the topology of intersection curves . . .... 24 51 Finding simple boundaries for a line segment. . . 28 52 Tolerance according to the intersection angle. . . 28 53 Tolerance with respect to the intersection angle. . . .. 30 54 Example 1. Two surfaces intersecting each other. . . ... 30 55 Exact intersection curve. ............... ... .. 31 56 Midstructures. ............... ......... .. 31 57 Intersection of two midstructures ................ .. .. 32 58 The BSpline curve inverted. ............. . .. 32 59 Tolerance of the intersection curve. .................. 33 510 Example 2. Two surfaces with the tolerance of its intersection curve. 33 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 FINDING INTERSECTION CURVES USING SUBDIVIDABLE LINEAR EFFICIENT FUNCTION ENCLOSURES By Minho Kim August 2004 Chair: Jorg Peters I. i r' Department: Computer and Information Science and Engineering Finding the intersection of two surfaces, usually a collection of curves, is an important challenge in modeling geometry. This thesis presents a method to find parametric (bspline) intersection curves which approximate the actual intersection curves of two B6zier surfaces. We first approximate the original surfaces using SLEFEs (Subdividable Linear Efficient Function Enclosures) and their midstructures. The piecewise linear curves, which are the intersections of two midstructures, are inverted to the bspline curves which approximate the exact intersection curves. Our method is fast, has known error bounds, and generates bspline curves, which are very useful for many applications. Moreover, our method can be refined with the guarantee of decreasing error bound. CHAPTER 1 INTRODUCTION Finding the intersection of two surfaces, Surface/Surface Intersection (SSI), plays an important role in the following areas: CAD (ComputerAided Design): trimming curves [ ], boundary representa tion [ ], CSG (Constructing Solid Geometry) [] manufacturing: tool path generation [ ] computer animation: interference detection [ feature recognition[, ] computer graphics: hidden surface removal [ ], visibility computations [ ] engineering: grid generation ] scientific visualization [ ]. Except for a few special cases, it is difficult to find the exact intersection. The difficulty arises from several aspects. First, even for surfaces of low polynomial degree, the intersection curve is typically of high degree. For example, the intersec tion curve of two tensorproduct bicubic B6zier surfaces can be as high as 324 [ ]. Moreover, some geometric complexities, which are, constrictions (near singular or singular cases) [ ], small loops, singularities, and multiple branches at the singulari ties make it more difficult [ ]. In addition, the imprecision introduced by numerical errors in finite precision computations makes it more complicated [ ]. This thesis presents a method for approximating the intersection of two B6zier surfaces with tolerance guarantees. Even though the intersection of two surfaces usually consists of isolated points, a set of curves, a set of overlapping surfaces, or any combination of these cases [ ], we can focus on curves since the 2 approximation excludes singular cases. Our method excels on speed and produces a useful output curve. Moreover, it is refinable with decreasing tolerance guaranteed. CHAPTER 2 PREVIOUS WORK 2.1 Overview Due to the strong demand mentioned earlier, there is a rich body of literature investigating SSI. According to the approaches they take, the methods can be categorized [ ,] into four classes: .ii/;:'i methods [ ], lattice evaluation methods [ marching methods [ and subdivision methods [ , ]. Some methods use the combinations of those methods. They are called .i1,.:1./ methods [ ]. 2.2 Analytic Methods 1Anili,.:, methods derive the equation which describes the intersection of two surfaces and tries to find the solution of the equation [ ]. But the possible high degree of the equation makes this method limited to several kinds of the surfaces. In Gradine [ ] and Gradine and Klein IV[ ], Grandine sees the SSI problem as a special case of the more general control, ii, problem. Rather than the usual i,1 ii of n equations in n variables, the contouring problem has fewer, say k, equations than variables, and has (n k)dimensional manifold as its solutions in the nonsingular cases. The SSI problem is the case of k = n 1, and thus has curves as the solutions [ ]. Before solving the nonlinear system, he first tries to find the topology of the intersection curves. Even though this process requires the class of the surfaces to be restricted, it reduces the initial value problem over an unknown parameter interval to a boundary value problem over a fixed, specified interval, thus eliminating many problems arising before. To solve the nonlinear system, he applies spline collocation and gets the solution parameterized by arclength [ ]. Patrikalakis [ ] first transforms the problem of finding the intersection of two surfaces to the intersection of a surface and a plane and makes it possible to use the subdivision method. He tries to find the ..:,iI'.:? n,/1 points (border points, turning points, and singular points) using adaptive subdivision and minimization. But this method is not general because it depends on the availability of a Bernstein polynomial representation of the intersection curve, which thus restricts the class of the surfaces. For more general cases, he introduces the oriented distance function and tries to find the zero set of it. 2.3 Lattice Evaluation Methods Lattice evaluation methods are based on the idea that if we fix one of the vari ables of the tensorproduct surface, the surface becomes a curve. In other words, we approximate one of the surfaces by a set of curves and calculate the intersection of the surface and each of the curves, which thus reduces the dimensionality of surface intersections [ ]. This method has a disadvantage in that we may miss some important features depending on the resolution of the grid. This method is not only used as an independent method to find the intersec tion of the surfaces [ ], but it is used as a part of other methods. For example, Patrikalakis uses this method to find the initial approximation for the collinear normal points, which then are used to find the critical points [ ]. In addition, many of the marching methods use this method to find the starting point [ ]. 2.4 Marching Methods lii, .,:.i methods, also called curve tracing schemes [ ], curve following schemes [ ], or continuation methods [ ], can be used for the more general cases. The basic idea behind it is to trace the points on the intersection curve from the 1. iil ,. point, which is already known on the intersection curve. But depending on the step size, this method also may miss some important features and jump to other segments of the curve when two curves are very close to each other. To find the starting points for every branch is also a challenge and many of the methods rely on the lattice evaluation or subdivision methods to find them [ ]. AbdelMalek and Yeh first try to find the starting points using the Moore Penrose pseudoinverse of the subJacobian. To trace the points on the curve, they use the PredictorCorrector method. In addition, the rowrank .1, .,7. ,:I of the Jacobian is used to detect the singularities along the curve [ ]. 2.5 Subdivision Methods Subdivision methods can be used for most general cases. They adopt the famous divideandconquer scheme to find the intersection. Even though they do not require the starting points, which is an important advantage, they also may miss some important features and the topology of the intersection curves [ ]. This is also the case of our method because we approximate original surfaces. Lanquetin et al. [ ] present the method to find the intersection curves of two subdivision surfaces. At the initial subdivision step, they find the piecewise linear intersection curve using the bruteforce triangletriangle intersection. But after the initial subdivision step, they use one of two strategies to reduce the number of triangles tested for the intersection. In the neighborhood 1ii','il/ i, they consider only the 1neighborhood of the previous intersecting curves. The other algorithm uses the bipartite qiratip to reduce the number of triangles involved [ ]. Gleicher and Kass also use the bounding volumes, specifically AABB (Axis Aligned Bounding Box), for the domain and interval arithmetic [ ]. This method is improved by Henrique by using affine arithmetic instead of the interval arith metic [ ]. Huber uses the bounding volumes to find the intersection. If two bounding vol umes are intersecting, one of the domains is split into two domains and calculated again until the given tolerance is satisfied. He uses interval arithmetic to compute the bounding volumes [ ]. 6 Jean and Hamann triangulate the surfaces using the adaptive t,.:,,,i,.1;.. : method and find the intersection curves of two triangle meshes, which are the linear spline curves. They use the kd tree structure to build the spacepartitioning tree, thus reducing the number of triangles involved. They also introduce an additional refinement step [ ]. CHAPTER 3 BACKGROUND KNOWLEDGE 3.1 SLEFE (Subdividable Linear Efficient Function Enclosure) 3.1.1 Overview The Subdividable Linear Efficient Function Enclosure (SLEFE) is a technique which constructs piecewise linear enclosure for a nonlinear function [ ]. Instead of constructing the enclosures for the function directly, which is slow, SLEFE tries to construct the enclosure of its basis functions, which can be done offline fast. Because enclosures of basis functions do not change once the basis functions and the number of linear pieces to enclose them are determined, they can be tabulated, thus making it fast to construct SLEFEs. Even though this method might be less optimal compared to constructing the enclosures of the given function directly, SLEFEs are very good L" approximands, and, moreover, they can be refined with the guarantee of decreasing tolerance. 3.1.2 Theoretical Basis The SLEFE is based on two general lemmas. Let x = b'x be the function of which we are trying to find the SLEFEs where b is the basis function vector of the vector space B to which x belongs. Lemma 1 (change of basis) Given two finitedimensional vector spaces of functions, B / s := dimB dim(B n H ),(bi)i ,...,diam a basis of B, (a), 1,,...,s functions in B, and linear maps L : B A :BIR, such that (i)(Aja)~j, is the *.7, ,l.li in RSX' and (ii)kerA = ker(E L) (where E is the embedding .,. iil,,i) then for any x := b x E B, (b Lb) x (a La) (Ax). (3.1) d =dim B aTb a,,i aTb a1,i SMb. In addition, let matrices ML and MA other words, L(x) and A(x) ... al,d b ... a,,d_ denote the linear maps L and A each. In SL(bx) bTMLX SA(bTx) SMax. Then, we can transform (3.1) using matrices as follows,: (b Lb) x bTx L(bTx) bTx bTMLX bTx bTMLx) bT(x MLX) (a La) (Ax) (Mab)T(Mx) L((Mab)TMAx) (Mab)T(MZx) L(bTMMzAx) bTM (Max) bTMLM MA bT(MTMax MLM MAX). (3.2) Now, from (i) we know MAM' = I, therefore Ax MAx (MAMT)MAX SMa(MTMa)x thus Max M (M MA)x = M (I M M )x 0 which means (I MTMA)x is a kernel of MA. (ii) means that the kernel of MA and E ML are the same. Therefore (E ML)(I MMA)x = 0. Now we get (E ML)(I MTMA)x 0 (E ML)x (E ML)MM (E M)x (M MLM (Max). xMLX MLMax MCMT Max. By multiplying bT on both sides, we get (3.2). Note this lemma from another view. Given two finitedimensional vector space B and H7, let L be an orlt..,., ! projection map from B onto its subspace B n 'H. In other words, L(x) is the orthogonally projected image of x on B n 7H where x is a function in B. Then we can easily change the basis functions of L(x) to those of 'H because L(x) E 'H. Now x L(x) is left. Because L is an orthogonal projection map, x L(x) is orthogonal to the subspace B n 'H and lies in another subspace B 'H of which dimension is s = dim(B H) = dimB dim(B n ). Therefore we can express x L(x) using only s number of vectors, say a = [ai a2 a ]T, which are linearly independent of each other in B H. We can now imagine a vector space A of which basis functions are a. Let A be the linear map from B to A. Then all the functions (ai)i1,...,s in B should be mapped to the unit vectors in A. The condition "(i)(jai)i,j is the .i1. Ldli in RW 8" is equivalent to this one. But when express L L(x) using a, we should remove all the components lying in B n 7 thus a L(a). Because the functions in the vector space A are orthogonal to the subspace B n 7 all the functions lying in B n will be mapped to zero in A by the linear map A. These functions also will be mapped to zero by the linear map E L because for those lying in B n 'H, L(x) = x, that is the projected image is the same with itself. This condition is equivalent to "(ii)kerA = ker(E L) (where E is the embedding ., ;,I.:1,.i)." Lemma 2 (bounds) If, with the .7. ,P1i:i. of Lemma 1, additionally the maps x  : sB  and x : B U ii a La < a La < a La componentwise on every point of a domain U, and (Ax) (i) := max{0, Ax(i)}, and (Ax)_ (i) : min{0, Ax(i)} then x : Lx + a La (Ax)+ + a La (Ax)_, S:=Lx + a La (Ax)_ + a La (Ax)+ sandwiches x on U: x < x <. From Lemma 1, we now get x = L(x) + (a La) (Ax). We can easily change the basis of L(x) to the basis of H because L(x) E 7H, but we cannot change the basis of (a La) (Ax), which is a La. Instead, we can enclose it with the functions in H, which are a La for the lower bound and a La for the upper bound. To enclose the function x, we have to choose the basis function, depending on its coefficients. For example, to find the lower bound of the function x, we have to choose the lower bound of the basis for the positive coefficients, but we have to choose the upper bound of the basis for the negative ones. Then all the basis functions of x and 7 are h, and therefore we can enclose the function x with the basis functions of F. In other words, x h T 7X = hT1. Here, we can notice that a La and a La do not change according to the coefficients x, which makes it fast to find SLEFEs. 3.1.3 Width of the SLEFE The width of the SLEFE can be defined as ,,. e = max(T ) U max{(a La a La)(Ax) (a La a La)(Ax)_} U max{(a La a La)(Ax) +(a La a La)(Ax)_} dl Smax (a, La a, Lai)Aix. i= 1 If A is a second difference map, Wslefe is affi',' 1, invariant. That is why we choose a second difference map for A in practice. 3.1.4 Example Here is a simple example. Let us consider a univeriate cubic polynomial function in B6zier form x(u) := bTX where x = [x0 X1 X2 X3]T b [bo bl b2 b3]T 3 3i bi (3 i)!i!( )3 t" 1 h (x) (a) 6h(x) 4h(x1/3) 3h(x2/3) 0 1/3 2/3 1 (b) Figure 31: (a) Hat function and (b) piecewise linear function produced by a linear combination of hat functions. We choose the basis functions of R as the hat functions because we want to enclose x with a piecewise linear function. The linear combination of hat functions h(x i/n) is a piecewise linear function with its break points at {i/n0i = 0,..., n} (Figure 31). Let h be the basis functions off T: h = [ho hi h2 h3 h = h(x i/3) where h(x) is a hat function. Functions in R1 are piecewise linear functions with their break points on 0, 1/3, 2/3 and 1. But using the basis b, we can express only the linear functions without any break points. Therefore, orthogonally projecting x to its subspace B n R1 is equivalent to selecting the linear parts from x, which is (1 u)xo + ux3. 13 We therefore get L(x) = (1 U)xo + ux xo \ 1 S u 0 0 u x2 X3 3 0 0 0 xo 1 0 0 2 x1 0 0 0 3 a3 SbTML ,,i of therefore 3000 12001 ML  ML 3 1 0 0 2 0003 Now we have to choose the linear map A. We choose a second difference operator to make the width Sslefe affinely invariant (3.1.3), and therefore 1 2 1 0 MA = 0 1 2 1 1 0 2 1 0 Ma  S 30 1 2 0 because M aM, = I. Now Mab (bTMML ) a La Figure 32: SLEFEs of al with its control points. Mab MaM b (Ma MaM)b 10 3 0 0 3 0 3 0 . 0 l 0 0 3 0 0 b 0 thus we get 1 a, [0 3 2 1 ]b and 1 a2 [0 1 2 ]b. 3 al is depicted in Figure 32 with its SLEFEs and control points [ ]. Because the process to construct the SLEFEs of al and a2 are offline, we can use any method, such as optimization, to construct them. 1 0 2 0 3 3210 0000 0000 0123 b 3.1.5 Tensoring SLEFEs Let de dt x(s,t) 0 xijbi(s)bj(t) i=0 j=0 b(s)TXb(t) be a tensorproduct polynomial x(s, t) in the vector space B x B where X is the coefficient matrix with its components xwj and b(s) and b(t) are the basis functions in the Bernstein polynomial form with their degrees d, and dt each. Now let x, = [xio xidt]T then Sb(t)Txo x(s, t) = b(s)TXb(t) = b(s)T 3 b(t) b(s)T T b(t)Tx Sb(s)x(t). For each b(t)Tx,, we can enclose them with r(t) = h(t)Tu and x(t) h(t)T where h(t) is the mpiecewise linear hat function. Let us consider the upper bound first. x(s, t) = b(S)T(t) h(t)7u (ut)T Io ... u, < b(s)T b(s)T h(t) =b(s)T h(t) h(t)Tu (u )U T ,o ... Ui t t U0,0 U,, b(s)T ... b(s)T h(t) t t Ud,o Ud,min < [h(s)Tuo ... h(s)Tu,]h(t) S h(s)TUh(t) Figure 33: Example of midstructure. A biquadratic B6zier patch (left) finely evaluated, (middle) approximated by .,iiliii. and (right) its midstructure[ ]. where h(s) is an npiecewise linear function, uj = [uo,j ... u,j]T and U is an nx m matrix with its element of uj,i. The lower bound case is straightforward. 3.1.6 Midstructure The midstructure = (X+ x)/2 can be used as a good L" approximand of the function x and has the tolerance of w'lf6e/2. For surfaces in 3D, the midstructure can be used as a way of triangu lation. Compared to other triangulation methods as adaptive ti .:,,, ;.uli ':. it is much faster but still has reasonable tolerance. Figure 33 shows the midstructure of a biquadratic B6zier patch [ ]. We are trying to find the intersection by using the midstructure to approxi mate the two surfaces. 3.1.7 Extension to Curves and Surfaces When we extend SLEFEs to curves and surfaces in 2D or 3D space, we get the SLEFE for each component separately (x and ycomponents for 2D case and x, y and z components for 3D case). Because all the components Figure 34: Bounding boxes of SLEFEs at break points. are independent of each other, we get 2D pairs of points, which construct a D dimensional axis aligned bounding box at each break point, as Figure 34 shows for the 2D case. Due to the linearity, the original curve or surface is confined in the convex combinations of the boxes (Figure 34). But we need to simplify the enclosures to make them more useful. But when we deal with midstructures, we do not have to care about this issue because the midpoint for each bounding box is unique. 3.1.8 Inverse of Midstructure We can get the original coefficients x from its midstructure 7 = (+Tx)/2 L(x) + (a + La+ a + La)(Ax)/2 (3.3) because a + La and a + La are tabulated, and the operator A is given (second difference), therefore we get the original function. This inverted function can be used as an approximand of the piecewise linear function T with known tolerance. We get the BSpline form of the intersection curve by inverting the piecewise linear curve, which is the intersection of the midstructures of two surfaces. CHAPTER 4 PROCEDURE 4.1 Constructing Midstructures of Tensorproduct B6zier Surfaces The SubLiME package (http://www.cise.ufl.edu/research/SurfLab) provides utility functions which find SLEFEs of several kinds of polynomial functions with various degrees and number of break points. Here is the utility function which finds the SLEFEs for a tensorproduct B6zier surface int tpSlefe ( REAL *coeff, int strideu, int stride, int degu, int degv, int segu, int segv, REAL* upper, REAL* lower, int stride_slefeu, int stride_slefev); where coeff: coefficients of B6zier surface strideu, stridev: strides between coefficients for each direction degu, degv: degree of Bernstein polynomial for each direction segu, segv: number of piecewise linear segments for each direction ( # of break points 1) upper, lower: .ii.i.', where the upper and lower bounds at each break point are stored. stride_slefeu, stride_slefev: strides between SLEFE bounds for each direction. As mentioned in 3.1.7, we have to call this function for each x, y and z component. m/1 / Pl Figure 41: Intersection of triangle and line segment. 4.2 Finding the Intersection of Midstructures To find the intersection of two midstructures, the collection of piecewise linear curves, we first need to find the intersections of all the pairs of triangles in each triangle mesh. After that, we construct the piecewise linear curves by connecting the line segments properly. 4.2.1 Finding the Intersection of Two Triangles To find the intersection of two triangles, we need to check the intersection of each edge of one triangle with the other triangle, thus six intersection tests. Intersection of a line segment and a triangle. A point p inside a triangle (including its vertices and edges) can be expressed as a convex combination of the vertices vl, v2 and va as follows: p tv + t2v2 + t3v3 (4.1) where ti + t2 +3 1 ti > 0 t2 > 0 t3 > 0. And a point on a line segment (including its end points) can be expressed as a convex combination of two end vertices pi and p2: p sp + ( s)p2 (4.2) where 0 < s < 1. Now we can express all the equations as follows: P2,x Vl,x V2,x V3,x P2,x Pl,x tl 1. Vl,y i 1P,y t2 P2,z 1,z V2,z V3,z P2,z Pl,z t 1 1 1 1 0 s Let M be the 4 x 4 matrix above. Then we can find ti, t2, t3 and s by multiplying the inverse matrix of M on both sides. If all four are nonnegative, we can say the line segment intersects with the triangle. In most cases, two triangles do not intersect or they intersect in a line segment. To connect such line segments correctly afterwards, we need to identify each intersection point uniquely. For the nonsingular and generate cases, a combination of index of the edge which intersects with the other triangle index of the triangle mesh where the above edge belongs index of the triangle which intersects with the edge above can be used to identify an intersection point. (Because we have only two triangle meshes, it is enough to have only the mesh index of the edge.) Singular cases. The singular cases are: when any pair of the three vertices of the triangle are same when all the vertices of the triangle lie on the same line when the two end points of the line segment are the same when the line segment is parallel to the plane where the triangle lies. For simplicity, we deal only with nonsingular cases. We can avoid most of the singular cases by additional refinement of the SLEFEs. Once it is confirmed that they intersect (nonsingular case), we can easily find the intersection point using (4.1) or (4.2). Degenerate cases. There are three kinds of degenerate intersection points. 1. when two vertices from each triangle meet (red points in Figure 43) 2. when one vertex of one triangle and one edge of the other triangle meet but not at any of the end points of the edge (blue points in Figure 43) 3. when two edges from each triangle meet but not at any of the end points (green points in Figure 43) Degenerate cases cause the intersection test to generate duplicated intersection points, which are actually the same. So we need an additional algorithm to prevent such cases. 1. If vertex v, of one triangle T1 lies on the other triangle T2, duplicated intersection points may be found by the intersection test of two edges el and el which share the vertex v0. To prevent it, we make the edges exclusive of each other (Figure 42). In other words, any point on the edge e< is defined as tvi_ + (1 t)vi, (4.3) where 0 < t < 1, i + k = (i+ k + 3) mod 3, andj E {1, 2}. Notice the range of t does not include 1, which makes the edges exclusive of each other. 2. To correctly identify the intersection points, when any of the vertices is also an intersection point, instead of using the three properties as the identifier, we use index of the vertex index of the mesh where the vertex belongs as the identifier. This identifier has a higher priority than the previous one when comparing two intersection points. V, S v3 e V2 Figure 42: Making triangle edges exclusive of each other. 3. If two vertices from each triangle intersect, any of the vertices can be used as the identifier. To make it unique, we use the vertex index of T2 as the identifier. 4. If two edges from each triangle intersect, any of the edges can be used as the edge index of the identifier. To avoid this, we use the edge index of T2 as the edge index of the identifier. Figure 43 shows the various degenerate cases. We can find some singular cases in the figure. With some more tests for the singular cases, we can use the same algorithm to uniquely identify the intersection points. But we do not deal with the singular cases in our implementation. 4.2.2 Finding the Topology of Piecewise Linear Intersection Curves After collecting all the intersecting line segments, we need to connect them properly. Each intersection line segment is composed of one or two intersection points. Because we want to approximate the intersection curves with BSpline curves, we ignore the case of one intersection point. In addition, we assume all the vertices can be shared by two edges at most, otherwise we cannot apply the inversion process. If any vertex if shared by more than two edges, we connect only pairs of them thus making them separate. Using the identifier of each intersection point, as described before, the intersec tion curve can be constructed as follows. At any step, there is a collection of piecewise linear curves constructed so far. Each piecewise linear curve consists of a list of intersection points. For an incoming Figure 43: Degenerate cases of triangletriangle intersection. Red, blue, and green points denote each vertexvertex, vertexedge, and edgeedge cases. intersection line segment, its two end points are compared with the first and last points of each piecewise linear curve. The topology of the current curves change according to the new line segment as follows (Figure 44): 1. Each two end points are the same with the first and last points of the same curve: The curve becomes closed by the new intersection line segment. No new point is added. 2. Two end points are the same with the first or last points of two different curves: The curves are merged together. No new point is added. 3. Only one of the end points is the same with the first or last of a curve: The other end point is added to the curve. 4. None of the two end points is the same with the first or last of any curve. The new curve is created with the two end points as its first and last points. The new curve is created with the two end points as its first and last points. case 1 case 2 case 3 Figure 4cas Constructin the topology of intersection curves. Figure 44: Constructing the topology of intersection curves. 7 3 4.2.3 Inverting Pircewise Linear Curves to BSpline Curves The SubLiME package also provides the utility functions which can be used to invert a piecewise linear curve to a BSpline curve. It also provides a function for a closed curve called bspInvClosed. The function for an open curve is as follows: int bspInv(REAL* mid, int cpnum, int deg, int mid_stride, REAL* coeff, int stride); where mid: coordinates of midstructure (piecewise linear curve) to be inverted to a BSpline curve cpnum: number of vertices of midstructure deg: degree of BSpline curve mid_stride: stride of vertices of midstructure coeff: .ii ., where control points of resulting BSpline curve will be stored stride: stride of control points Usage of the function for the closed curve is the same. CHAPTER 5 ANALYSIS 5.1 Evaluating an Exact Intersection To see how close our approximation is to the exact intersection, we need to find the exact intersection. But as described earlier, the exact intersection can be found only for a few cases. One of the cases is to find the projection of a curve C lying in xyplane on the B6zier surface SH where its control points are the height fields of xyplane. If we sweep the curve C along zaxis, we can get a surface Sc, and the projection on the surface SH of C can be considered as the intersection of the two surfaces SH and Sc (Figure 54). In this case, we can evaluate the exact intersection using composition as follows. Let the domain DH of SH be the unit square of uv plane where 0 < u, v < 1, and Dc of C be the unit length line segment of t axis where 0 < t < 1. We need to evaluate the points on the intersection curves corresponding to 0 < t < 1. For a given t value, we can easily evaluate the corresponding point (xc(t), yc(t)) on C. We now need to map this point to a (u, v) value of DH. Let (XH(U, v), YH(u, v), ZH(U, v)) be the point on SH. Because the x and y coordinate values of SH are regularly located, we can linearly map a point (x, y) on the xy plane to DH. In other words, u = axH(u,v) + b = axc(t) + b v = cyH(U,v) d= cxc(t) d where a and c are not zeros because x and y coordinate values of SH are same with those of C. Now we can evaluate the z coordinate value of the intersection point using (u, v). Therefore the points on the intersection curve is (xc(t), yc(t), ZH(axc(t) + b, (t) + d)). Figure 55 shows an exact intersection curve evaluated in this way. 5.2 Measuring Tolerance To measure the tolerance of the approximated intersection curve, we need to simplify its SLEFEs. Let us examine the 2D case. We can easily extend it to the 3D case. As mentioned before, at each break point, the enclosing bounds built by SLEFEs result in an axisaligned box. To make it simple to measure the tolerance of intersection, we need the upper and lower bounds to be (i) parallel with the midstructure and (ii) have the same distance from the midstructure. To do this, we find the planes each containing the corners of the bounding boxes at the break points and select the one with maximum distance from the midstructure. We need to find and check N x 2D number of planes where N is the number of break points for each midstructure segment and D is the dimension. For example, 2 x 22 8 number of planes are found and checked in 2D case (Figure 32). In the 3D case, we may have 3 x 23 number of planes because we need to find such bounds for each triangle. Then we get a pair of SLEFEs which satisfy our conditions. A plane can be expressed as d = n x =n x where n is the normal vector. If n is normalized, d is the distance of the plane from the origin. In other words, all the points on the plane have the same distance from the origin if they are projected to the same normal vector n. Therefore, the distance of the plane where a point p belongs and has normal vector n is nTp. By comparing such distance of all the points, we can find the plane which Ax, Ay2 Ay1@ AX, Figure 51: Finding simple boundaries for a line segment. e, sinO 1= e sin9 0=s1800 I / e= 1~ +1 211, coso /e, +e +2e2e,cosO sin9 e2 + e2 2eje, cos(180 ) sin9 Figure 52: Tolerance according to the intersection angle. is the farthest from the plane of midstructure. In other words, the tolerance of a midstructure segment (triangle in 3D case) e is e = max InTpi d where n is the normlized normal vector of the plane where the triangle lies, pi is one of the corner points, and d is the distance of the midstructure segment from origin. Now, let us consider the case when two SLEFEs intersect (Figure 52). From the figure, we can find that the intersection point of two SLEFEs is enclosed in a parallelepiped and the maximum tolerance is half of its longer diagonal. If the SLEFEs intersect with the angle 0 < 90, the tolerance is e 2 +e 2eCe2cos0 sin 0 where el and e2 are the tolerance of each SLEFE. Figure 53 shows the tolerance with various intersection angles and ratio of two tolerances. As it shows, the tolerance increases rapidly as the intersection angle gets close to zero. For each pair of triangles, we can find a line segment with its tolerance. We can imagine a cylinder for each line segment of which the radius is the tolerance. The exact intersection curve is guaranteed to be inside of such cylinders for each corresponding segment (Figure 59). By inverting the piecewise linear curves to BSpline curves, we get additional error bounds siefe/2 between the line segment and its corresponding BSpline curve segment. Therefore the overall tolerance is just e + siefe/2. el=3e2 el=2e2 el=e2 10 20 30 40 50 intersection angle 60 70 80 90 Figure 5 spheres. curve, e2 3: Tolerance with respect to intersection angle and ratio of bounding xaxis denotes the intersection angle, el is fixed to 1 and from the bottom 1, 2, 3,... and so on. Figure 54: Example 1. Two surfaces intersecting each other. The cylindrical sur face is constructed using four B6zier patches. Figure 55: Example 1. Exact intersection curve computed as described. Figure 56: Midstructures of Figure 54. Figure 57: Intersection of two midstructures in Figure 56. Figure 58: The BSpline curve inverted from Figure 57. 33 " Figure 59: Tolerance of the intersection curve in Figure 57 illustrated by cylinder about the linear segments. Figure 510: Example 2. Two surfaces with the tolerance of its intersection curve. CHAPTER 6 CONCLUSION AND FUTURE WORK To approximate the intersection curves of two surfaces, we triangulate the original surfaces using midstructures of SLEFEs. The piecewise linear intersection curves of these two triangle meshes are inverted to BSpline curves to approximate the intersection curves. To improve the result, we can apply various methods to each process. First, because finding the enclosing bounds in the basis space is offline, we can apply various methods. For example, we can use some optimization methods to minimize the width of the SLEFEs. To make the upper and lower SLEFEs always parallel, we may be able to make the upper and lower SLEFEs parallel in basis space. All such improvements do not affect the efficiency because they are onceandall processes. If we want to use the midstructure as a method of triangulation, rather than using the midpoints to get the midstructure, we can find an independent piecewise linear curve which approximates the basis function and use this to get the midstructures. Because the process of triangulating the original surfaces is separated from the process of approximating the piecewise linear curve using BSpline curves, we can use other methods to triangulate the surfaces only if the tolerance is known. But other triangulation methods are probably slower than the SLEFE method. REFERENCES [1] Thomas A. Grandine, "Applications of Contouring," SIAM Review, vol. 42, no. 2, pp. 297316, Jun. 2000. [2] B. A. Jean and Bernd Hamann, "An efficient surfacesurface intersection algorithm using adaptive surface triangulations and space partitioning trees," Mathematical Engineering in Industry, vol. 7, no. 1, pp. 2540, Sep. 1998. [3] Ernst Huber, IiI i acting general parametric surfaces using bounding volumes," in Proceedings of the 10th Canadian Conference on Computational Geometry CCCG'98, pp. 5253, Montreal, Qudbec, Canada, Aug. 1998. [4] Shankar Krishnan and Dinesh Manocha, "An efficient surface intersection algorithm based on lowerdimensional formulation," ACM Transactions on Graphics, vol. 16, no. 1, pp. 74106, Jan. 1997. [5] Nicholas M. Patrikalakis, "Surfacetosurface intersections," IEEE Computer Graphics and Applications, vol. 13, no. 1, pp. 8995, Jan. 1993. [6] Ernst Huber, "Surfacetosurface intersection based on triangular parameter domain subdivision," in Proceedings of the 11th Canadian Conference on Computational Geometry CCCG'99, pp. 100102, Vancouver, British Columbia, Canada, Aug. 1999. [7] Wilhelm Barth and Ernst Huber, "Computations with tight bounding volumes for general parametric surfaces," in Proceedings of 15th European Workshop on Computational Geometry CG'99, pp. 123126, Antibes, France, Mar. 1999. [8] R. E. Barnhill, G. Farin, M. Jordan and B. R. Piper, "Surface/surface intersection," Computer Aided Geometric Design, vol. 4, no. 12, pp. 316, Jul. 1987. [9] S. Lanquetin, S. Foufou, H. Kheddouci and M. Neveu, "Computing subdivi sion surface intersection," in Proceedings of WSCG '2003, pp. 7376, Campus Bory, Plzen Bory, Czech Republic, Feb. 2003. [10] K. AbdelMalek and H. J. Yeh, "Determining intersection curves between surfaces of two solids," ComputerAided Design, vol. 28, no. 67, pp. 539549, Jun.Jul. 1996. [11] Edwin Boender, "A survey of intersection algorithms for curved surfaces," Computers & Graphics, vol. 15, no. 1, pp. 109115, 1991. [12] Thomas A. Grandine and Frederick W. Klein IV, "A new approach to the surface intersection problem," Computer Aided Geometric Design, vol. 14, no. 2, pp. 111134, Feb. 1997. [13] C. L. Bajaj, C. M. Hoffmann, R. E. Lynch and J. E. H. Hopcroft, "Tracing surface intersections," Computer Aided Geometric Design, vol. 5, no. 4, pp. 285307, Nov. 1988. [14] Luiz Henrique de Figueiredo, "Surface intersection using affine arithmetic," in Proceedings of the Conference on Graphics Interface '96, pp. 168175, _.i,, 1996. [15] M. Gleicher and M. Kass, "An interval refinement technique for surface intersection," in Proceedings of the Conference on Graphics Interface '92, pp. 242249, Vancouver, British Columbia, Canada, M.,, 1992. [16] Jorg Peters and Xiaobin Wu, "Optimized refinable surface enclosure," Technical report, University of Florida, Oct. 2000. [17] Jorg Peters and Xiaobin Wu, "On the opl iil.]iliv of piecewise linear max norm enclosures based on slefes," in Proceedings of Curve and Surface Design: SaintMalo 2002, pp. 335344, SaintMalo, France, Jul. 2002. [18] Jorg Peters, "Efficient onesided linearization of spline geometry," in Proceedings of The Mathematics of Surfaces X, pp. 297319, Leeds, UK, Sep. 2003. [19] David Lutterkort and Jorg Peters, "Optimized refinable enclosure of multivariate polynomial pieces," Computer Aided Geometric Design, vol. 18, no. 9, pp. 851863, Nov. 2001. [20] G. Farin, "An SSI bibliography," in R. Barnhill, editor, Geometry Processing for Design and Manufacturing, pp. 205207, SIAM, Philadelphia, Jan. 1992. BIOGRAPHICAL SKETCH Minho Kim was born on March 3, 1974, in Seoul, Republic of Korea. He received his Bachelor of Science degree in electrical engineering in 1997 from Seoul National University, Seoul, Republic of Korea. In 2004, he received his Master of Science degree from the Department of Computer and Information Science and Engineering at the University of Florida. His major research area is computer graphics. I certify that I have read this study and that in my opinion it conforms to acceptable standards of scholarly presentation and is fully adequate, in scope and quality, as a thesis for the degree of Master of Science. Jorg Peters, Jorg Peters Associate Professor of CISE I certify that I have read this study and that in my opinion it conforms to acceptable standards of scholarly presentation and is fully adequate, in scope and quality, as a thesis for the degree of Master of Science. Anand Rangarajan Associate Professor of CISE I certify that I have read this study and that in my opinion it conforms to acceptable standards of scholarly presentation and is fully adequate, in scope and quality, as a thesis for the degree of Master of Science. Paul Fishwick Professor of CISE This thesis was submitted to the Graduate Faculty of the College of Engi neering and to the Graduate School and was accepted as partial fulfillment of the requirements for the degree of Master of Science. August 2004 Pramod P. Khargonekar Dean, College of Engineering Winfred M. Phillips Dean, Graduate School TITLE OF THE DISSERTATION Minho Kim (352) 3773788 Department of Computer and Information Science and Engineering Chair: Jorg Peters Degree: Master of Science Graduation Date: August 2004 Enter the text of you general audience abstract here. 