LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAICN 510.84 ho.445-450 The person charging this material is re- sponsible for its return to the library from which it was withdrawn on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University. UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN L161 — O-1096 Digitized by the Internet Archive in 2013 http://archive.org/details/procedurefordete449maru Of *• e i Report No. kk9 /k^C4 A PROCEDURE FOR DETECTING INTERSECTIONS AND ITS APPLICATION by Kiyoshi Maruyama May, 1971 THE LltiKAKY Ul- I HE UNlVtRSH Y Oi- ILLINOIS ^j yp 'ama-CHAMPAIGN Report No. 4^9 A PROCEDURE FOR DETECTING INTERSECTIONS AND ITS APPLICATION by Kiyoshi Maruyama May, 1971 Department of Computer Science University of Illinois at Urbana-Champaign Urbana, Illinois 6l801 This work was supported in part by the Department of Computer Science at the University of Illinois at Urbana-Champaign, Urbana, Illinois; the National Science Foundation under NSF Grant GJ-328. Ill ACKNOWLEDGEMENT The author wishes to thank Dr. J. Nievergelt, Professor of Computer Science at the University of Illinois, for suggesting the problem and his helpful discussion and comments. Thanks are extended to Miss Sue Cook who helped in getting this report finished. IV TABLE OF CONTENTS Page 1. INTRODUCTION ± 2. INTERSECTION DETECTION PROCEDURES FOR GEOMETRIC OBJECTS 2 2. 1 P-C FUNCTION APPROACH 2 2. 2 LP AND IP APPROACH 5 2.3 GEOMETRIC APPROACH 6 2. 1; SPACE PARTITION APPROACH . „ 6 3. GEOMETRIC PROCEDURE FOR DETECTING INTERSECTIONS . . . . . . . H 3.1 PRELIMINARY DISCUSSION . . . „ H 3-2 FACE-TO-FACE INTERSECTION DETECTION 15 3. 3 MJRTHER DISCUSSION „ 20 3. 4 ALGORITHM AND EXPERIMENTAL RESULT . . „ 25 k. A PROBLEM IN PATH FINDING 29 4.1 STATE SEARCH AND STATE CONTIGUITY . . . „ . . 30 4.2 PATH SEARCHING y 4 if. 3 SEARCH TREE PRUNING 37 '4. k EVALUATION FUNCTION AS A DISTANCE EVALUATOR 37 !+. 5 EXAMPLES OF DISTANCE EVALUATION FUNCTION >,0 4.6 SIMULATION RESULTS OF GOAL SEEKING AUTOMATON Itf 5. CONCLUSION „ 71 LIST OF REFERENCES 72 1. INTRODUCTION A problem of both practical and theoretical interest is to determine if an object can be moved from one position a to another position p, inside a complicated geometric structure. In some problems there will be no path from a to p and some others there will be several paths of which perhaps the shortest must be determined. A restricted problem of this type, the two dimensional sofa problem has been studied by Howden [17 ]. To solve such a problem it is basically important to have a very efficient algorithm for determining whether two bodies intersect, since a moving object cannot share the same space with some other moving objects or with obstacles at the same time. This intersection detection problem between physical objects has been studied by Comba[l], for convex objects with differentiable surfaces. The plan of this report is as follows. In chapter 2 we introduce several intersection detection procedures for geometric objects, and an intersection detection procedure by means of face-to-face intersection analysis ' will be discussed in Chapter 3- As an application of the intersection detection procedure developed in Chapter 3, we will disucss a path finding problem in geometrically constrained space in Chapter If. I NTERSECTION DETECTION PROCEDURES FOR GEOMETRIC OBJECTS In this chapter, we describe several procedures to detect intersections hetween objects. The representation of objects and its data structure [8 , 19] are heavily dependent upon the class of objects as well as a detection procedure used. 2.1 P-C FUNCTION APPROACH Let us first describe the procedure which has been developed by Comba [1 for detecting intersections of convex regions in J-space by means of a pseudo- characteristic (P-C) function. Given n objects, each of which is bounded by one or more surfaces, the problem of deciding whether all the objects have a common intersection may be formulated as the problem of finding whether a system of inequalities (in general nonlinear) has a feasible solution. In the approach followed here, the expressions that represent the bounding surfaces of all the objects are combined into a single pseudocharacteristic function, G(x,y,z), which has the property that the region where G < 0, if such a region exists, is a close approximation to the region where all the objects intersect. The problem is thus reduced to that of finding whether there are any points in space where G takes on nonpositive values. A). An object is the intersection of k > 1 regions % where each Ej. is defined by an inequality Si (x,y,z) < 0, and the function g, has the following properties: (i) It is convex (ii) It is differentiable (iii) It is normalized so that igrad gi | > | on the surface gj_ = 0, and (iv) Given a bounded region of space, grad gi is bounded there. The p-c function G of the intersection of n objects is defined in terms of the g ± functions for the objects by V ± = (g* + t 2 ) 1 ^ + g . (i) V = )^i (2) r 1 (v t2 ^ G= 2 (v -~) + c (3) where t anc c are small positive numbers. The boundedness of the objects is not a serious restriction from a practical viewpoint. The convexity assumption is the most restrictive, since it implies that only convex objects can be defined. Comba proved that G is a convex function of the g± and hence of the coordinate variables. Convexity and boundedness imply further that, G has exactly one ninimum. it is possible to compute lower bounds for the values of G without actually finding its minimum. The assumption of differentiability makes it possible to use a gradient method in the search for negative values of G and the computation of lower bounds to G. B). A sequence of points approaching the minimum of G is constructed by means of a descent procedure. The search is terminated as soon as (i) a negative value of G is obtained, Indicating that there is an intersection; or (ii) the minimum of G is obtained and if it is positive, there is no intersection; if bounds on the size of the objects are known, it is possible to compute lower bounds for G, and the search can be stopped if a positive lower bound is established. The central idea of the method is that of applying the transformation (1) to each of the faction gi that define the various regions % . *e Action V ± is always positive and it is an increasing function of gl . If t < 1, V ± also has the property that f 2 Si + 0(t 2 ) §i > ° V. = i Consider the expression t & i 0(t 2 ) 6i < ° 1 t 2 G* - | (V - V we can easily verify that the transformation from V to G* is the inverse of the transformation from 6i to V V It can he also seen that G ( < V < t = o v = t > o v > t. Hence, except for the vicinity of the spaces gi - 0., G* will be negative inside the intersection of the regions g, < and positive outside that intersection. The reader may see [ Oj for further discussion. If all of the functions g ± are linear, the intersection detection problem reduces to a linear programming problem, i.e. deciding whether a set of linear inequalities has a feasible solution. In this case one would expect a priori that a linear programing algorithm will solve the problem more efficiently than an algorithm based on the p-c function. Comba assumed convex objects with differentiable surfaces but we hereafter assume a more restricted class of objects namely, polygons for 2-space and polyhedra for 3 -space. This restriction is reasonable because many objects can be represented as the union of (convex or nonconvex) polyhedra in 3- space and detecting intersection of such unions in an immediate extention of the case for a single pair of polyhedra. 2.2 LP AND IP APPROACHES When one assumes polyhedral objects to be convex or to be unions of convex polyhedra, a set of linear inequalities represents a convex object. To detect an intersection between two objects, this algorithm (i.e. the phase 1 of Simplex Method) searches for the existence of feasible solutions to the joint set of linear inequalities of two convex polyhedra. Therefore, if one object 2 consists of the union of N convex polyhedra and the other object fi* consists of N' convex polyhedra, then it is necessary to solve (N x N') joint sets of inequalities to conclude whether or not SI and fi' intersect. Furthermore, if there are M such objects in space to be solved for intersection, it is necessary to determine M(M-l)/2 object-object intersection detections. However, allowing new integer variables (i.e. O-l) we get one composite system by Integer Programming formulation. Let Q ± , i = 1,2, . . .M, be M objects and let for each £l ± , g ± < denotes the corresponding set of inequalities. Since the placement of M objects is possible only if a ± n fij =