Presentation is loading. Please wait.

Presentation is loading. Please wait.

A data Type for Computational Geometry & Solid Modelling Abbas Edalat Andr é Lieutier Imperial College Dassault Systemes.

Similar presentations


Presentation on theme: "A data Type for Computational Geometry & Solid Modelling Abbas Edalat Andr é Lieutier Imperial College Dassault Systemes."— Presentation transcript:

1 A data Type for Computational Geometry & Solid Modelling Abbas Edalat Andr é Lieutier Imperial College Dassault Systemes

2 2Aim i.Mathematically sound, realistic ii.Bridges theory and practice To develop a data type for CG & SM

3 3 Why do we need a data type for solids? Answer: To develop robust algorithms! Lack of a proper data type and use of real RAM in which comparison of real numbers is decidable give unreliable programs in practice!

4 4 The Intersection of two lines With floating point arithmetic, find the point P of the intersection L 1  L 2. Then: min_dist(P, L 1 ) > 0, min_dist(P, L 2 ) > 0.

5 5 The Convex Hull Algorithm A, B & C nearly collinear With floating point we can get:

6 6 A, B & C nearly collinear The Convex Hull Algorithm With floating point we can get: (i) AC, or

7 7 A, B & C nearly collinear The Convex Hull Algorithm With floating point we can get: (i) AC, or (ii) just AB, or

8 8 A, B & C nearly collinear The Convex Hull Algorithm With floating point we can get: (i) AC, or (ii) just AB, or (iii) just BC, or

9 9 A, B & C nearly collinear With floating point we can get: (i) AC, or (ii) just AB, or (iii) just BC, or (iv) none of them. The quest for robust algorithms is the most fundamental unresolved problem in solid modelling and computational geometry. The Convex Hull Algorithm

10 10 Subset A  X topological space. Membership predicate  A : X  {tt, ff } is continuous iff A is both open and closed. A Fundamental Problem in Topology and Geometry In particular, for A  R n, A  , A  R n  A : R n  {tt, ff } is not continuous. Most engineering is done, however, in R n.

11 11 The basic building blocks of classical geometry are not continuous and hence not computable in R n. The Discontinuity of the Membership Predicate True Example: The point is in the box.

12 12 False The basic building blocks of classical geometry are not continuous and hence not computable in R n. The Discontinuity of the Membership Predicate Example: The point is in the box.

13 13 There is a discontinuity if x goes through the boundary. Non-computability of the Membership Predicate This predicate is not computable: If x is on the boundary, we cannot in general determine if it is in or out at any finite stage of computation. FalseTrue

14 14 Non-computable Operations in Classical CG & SM  A : R n  {tt, ff} not continuous means it is not computable, even for simple objects like A=[0,1] n. x  A is not decidable even for simple objects: for A = [0,  )  R, we just have the undecidability of x  0. The Boolean operations such as  is not continuous, hence noncomputable, wrt any natural notion of topology on subsets. For example:  : C(R n )  C(R n )  C(R n ), where C(R n ) is compact subsets with the Hausdorff metric.

15 15 Intersection of two 3D cubes

16 16 Intersection of two 3D cubes

17 17 Intersection of two 3D cubes

18 18 This is Really Ironical! Topology and geometry have been developed to study continuous functions and transformations on spaces. The membership predicate and the binary operations for  and  are the fundamental building blocks of topology and geometry. Yet, these fundamental functions are not continuous in classical topology and geometry.

19 19 Elements of a Computable Topology/Geometry  A : X  {tt, ff} fails to be continuous on  A, the boundary of A. For any open or closed set A, the predicate x   A is non-observable, like x = 0. Redefine:  A : X  {tt, ff}  with the Scott topology on {tt, ff} . ttff open  observable Non-observable  A is now a continuous function.

20 20 Elements of a Computable Topology/Geometry Note that  A =  B iff int A=int B & int A c =int B c, i.e. sets with the same interior and exterior have the same membership predicate. We now change our view: In analogy with classical set theory where every set is completely determined by its membership predicate, we define a (partial) solid object to be given by any continuous map f : X  { tt, ff }  Then: f –1 {tt} is open; it’s called the interior of the object. f –1 {ff} is open; it’s called the exterior of the object.

21 21 Partial Solid Objects We have now introduced partial solid objects, since X \ (f –1 {tt}  f –1 {ff}) may have non-empty interior. We partially order the continuous functions: f, g : X  {tt, ff }  f ⊑ g   x  X. f(x) ⊑ g(x) f ⊑ g  f –1 {tt}  g –1 {tt} & f –1 {ff}  g –1 {ff} Therefore, f ⊑ g means g has more information about an idealized real solid object.

22 22 The Solid Domain of X The solid domain S (X) of X is the partial order (X  {tt, ff } , ⊑ ) S(X) is isomorphic to the poset S O (X) of pairs of disjoint open sets (O 1,O 2 ) ordered componentwise by inclusion:

23 23 Properties of the Solid Domain Theorem For a (second countable) locally compact Hausdorff space X (e.g. R n ), S(X) is (  –) continuous. and (U 1, U 2 ) << (V 1, V 2 ) iff U 1  V 1 & U 2  V 2 Theorem If X is Hausdorff, then: (O 1, O 2 )  Maximal (S X, ⊑ ) iff O 1 = int O 2 c & O 2 = int O 1 c. This is a regular solid object: O 1 =int O 1 & O 2 =int O 2 Definition (O 1, O 2 ), O 1 ≠ ∅ ≠ O 2, is a classical object if O 1 ∪ O 2 = X.

24 24Examples A = {x  R 2 ⃒ |x| ≤ 1}  [1, 2] represented in the model by (int A, int A c ) = ( {x ⃒ |x| < 1}, R 2 \ A ) is a classical (but non-regular) solid object. B = {x  R 2 ⃒ |x| ≤ 1} represented by ({x ⃒ |x| 1})  Maximal (SR 2, ⊑ ) is a regular solid object. A B

25 25 Boolean operations and predicates Theorem All these operations and predicates are Scott continuous.

26 26 Subset Inclusion Subset inclusion is Scott continuous. Let

27 27 General Minkowski operator For smoothing out sharp corners of objects. S b R n = { (A, B)  SR n | B c is bounded} ∪ {( ∅, ∅ )}. All real solids are represented in S b R n. Define: _  _ : SR n  S b R n  SR n ((A,B), (C,D)) ↦ (A ⊕ C, (B c ⊕ D c ) c ) where A ⊕ C = { a+c | a  A, c  C } Theorem _  _ is Scott continuous.

28 28 (A, B) is a computable partial solid object if there exists a total recursive function ß such that An effectively given solid domain SX can be given effective structure for any locally compact second countable Hausdorff space, e.g. R n, S n, T n, [0,1] n. Consider X=R n. The set of pairs of disjoint open rational polyhedra of the form K = (L 1, L 2 ), gives a basis for SX. Let K n = (π 1 ( K n ), π 2 ( K n ) ) be an enumeration of basis. (A, B) = ( ∪ n π 1 ( K ß(n) ), ∪ n π 2 ( K ß(n) ) )

29 29 Computing a Solid Object In this model, a solid object is represented by its interior and exterior. The interior and the exterior are approximated by two nested sequence of rational polyhedra.

30 30 Computable Operations on the Solid Domain F: (SX) n  SX or F: (SX) n  { tt, ff }  is computable if it takes computable sequences of partial solid objects to computable sequences. Theorem All the basic Boolean operations and predicates are computable wrt any effective enumeration of either the partial rational polyhedra or the partial dyadic voxel sets.

31 31 Quantative Measure of Convergence In our present model for computable solids, there is no quantitative measure for the convergence of the basis elements to a computable solid. Example: The minimum distance from say a rational point to a computable solid is semi- computable, but not computable. We will enrich the notion of domain-theoretic computability to include a quantitative measure of convergence.

32 32 We strengthen the notion of a computable solid by using the Hausdorff distance d between compact sets in R n. d(C,D) = min{ r | C  D r & D  C r } where D r = { x |  y  D. |x-y|  r } (A, B)  S [–k, k] n is Hausdorff computable iff there exists an effective chain K ß(n) of basis elements with ß a total recursive function such that: (A, B) = ( ∪ n π 1 ( K ß(n) ), ∪ n π 2 ( K ß(n) ) ) with d (π 1 ( K ß(n) ), A ) < 1/2 n, d (π 2 ( K ß(n) ), B) < 1/2 n Hausdorff Computability

33 33 Hausdorff computability Two solid objects which have a small Hausdorff distance from each other are visually close. The Hausdorff distance gives a natural quantitative measure for approximation of solid objects. However, the intersection or union of two Hausdorff computable solid objects may fail to be Hausdorff computable. Examples of such failure are nontrivial to construct.

34 34 Lebesgue Computability (A, B)  S [–k, k] n is Lebesgue computable iff there exists an effective chain K ß(n) of basis elements with ß a total recursive functions such that: (A, B) = ( ∪ n π 1 ( K ß(n) ), ∪ n π 2 ( K ß(n) ) ) µ(A) - µ(π 1 ( K ß(n) ) ) < 1/2 n and µ(B) - µ(π 2 ( K ß(n) ) ) < 1/2 n. The definition can be extended to SR n. Theorem Boolean operations are Lebesgue computable.

35 35 Hausdorff computable  Lebesgue computable Lebesgue computable  Hausdorff computable Theorem: A regular solid object is computable iff it is Hausdorff computable. However: A computable regular solid object may not be Lebesgue computable. Hausdorff and Lebesgue Computable Objects

36 36 Comparison of Various Notions of Computability Partial solid in R n Distance to a point Boolean operators Lebesgue measure Computable semi- computable computable non- computable Hausdorff computable computable non- computable Lebesgue computable semi- computable computable

37 37 The data type We use pairs of disjoint dyadic open polyhedra with either the Hausdorff or the Lebesgue measure for approximating the idealized solid object. ((A, B), 1/2 m )

38 38 The Convex Hull Algorithm

39 39 The Convex Hull Algorithm

40 40 The Convex Hull Algorithm

41 41 Let H m : (R 2 ) m  C (R 2 ) be the classical convex Hull map, with C (R 2 ) the set of compact subsets of R 2. Let (IR 2,  ) be the domain of rectangles in R 2. Each rectangle T  IR 2 has vertices T 1,T 2,T 3,T 4. I m (x)=Int(  {H m ((T i f(i) )) 1  i  m ) | f:N m  N 4 }) where N k ={1,2,…,k} The Convex Hull map For x=(T 1,T 2,…,T m )  (IR 2 ) m, define: C m : ( IR 2 ) m  SR 2 C m (x)=(I m (x),E m (x)) with E m (x)=(H 4m ((T i 1,T i 2,T i 3,T i 4 )) 1  i  m ) c

42 42 The Convex Hull is Computable! Theorem: The map C m : (IR 2 ) m  SR 2 is Hausdorff and Lebesgue computable. Complexity: 1. E m (x) is O(m log m). 2. I m (x) is O(m 3 ) but there is a good approximation in O(m log m ), the complexity of the classical convex hull algorithm.

43 43Conclusion Our model satisfies:  A well-defined notion of computability  Reflects the observable properties of real solids  Is closed under basic operations  Captures regular and non-regular sets  Supports a methodology for designing robust algorithms

44 44 Further Work Work to be done: Implementation  with exact real arithmetic  with interval input as in CAD Theoretical work  Lebesgue computability of  for regular solids  Boundary representation  Differential properties of curves/surfaces  Solids of manifolds

45 45 Hausdorff computability However: Q  ([1,0]  [0, –1]) = [r,1]  {0}  R 2 is not Hausdorff computable. is Hausdorff computable.

46 46 Hausdorff and Lebesgue computability Lebesgue computable  Hausdorff computable Let 0 < r n  Q with r n ↗ r, left computable, non- computable 0 < r < 1. Then [r,1]  {0}  R 2 is Lebesgue computable but not Hausdorff computable.

47 47 Hausdorff and Lebesgue computability Hausdorff computable  Lebesgue computable Complement of a Cantor set with Lebesgue measure 1– r with r =lim r n : left computable, non-computable. s tart with stage 1 stage 2 At stage n remove 2 n open mid-intervals of length s n /2 n. 01 s0s0

48 48 We strengthen the notion of a computable solid by using the Hausdorff distance d between compact sets as a quantitative measure of convergence. (A, B)  S [–k, k] n is Hausdorff computable iff there exists an effective chain K ß(n) of basis elements with ß a total recursive function such that: (A, B) = ( ∪ n π 1 ( K ß(n) ), ∪ n π 2 ( K ß(n) ) ) with d (π 1 ( K ß(n) ), A ) < 1/2 n, d (π 2 ( K ß(n) ), B) < 1/2 n d (π 1 ( K ß(n) ) c, A c ) < 1/2 n, d (π 2 ( K ß(n) ) c, B c ) < 1/2 n Hausdorff Computability

49 49


Download ppt "A data Type for Computational Geometry & Solid Modelling Abbas Edalat Andr é Lieutier Imperial College Dassault Systemes."

Similar presentations


Ads by Google