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

Slides:



Advertisements
Similar presentations
Abbas Edalat Imperial College London Interval Derivative of Functions.
Advertisements

Joint work with Andre Lieutier Dassault Systemes Domain Theory and Differential Calculus Abbas Edalat Imperial College Oxford.
Abbas Edalat Imperial College London Contains joint work with Andre Lieutier (AL) and joint work with Marko Krznaric (MK) Data Types.
Joint work with Andre Lieutier Dassault Systemes Domain Theoretic Models of Geometry and Differential Calculus Abbas Edalat Imperial College
Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
TEL-AVIV UNIVERSITY FACULTY OF EXACT SCIENCES SCHOOL OF MATHEMATICAL SCIENCES An Algorithm for the Computation of the Metric Average of Two Simple Polygons.
Lecture 24 MAS 714 Hartmut Klauck
Closure Properties of CFL's
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Lecture 6 Hyperreal Numbers (Nonstandard Analysis)
Doing it without Floating Real and Solid Computing Abbas Edalat.
International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April , Tehran 1 II SIZE FUNCTIONS:
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Sets 1.
Sets 1.
1 Foundations of Interval Computation Trong Wu Phone: Department of Computer Science Southern Illinois University Edwardsville.
Chapter 4: A Universal Program 1. Coding programs Example : For our programs P we have variables that are arranged in a certain order: Y 1 X 1 Z 1 X 2.
Rational and Real Numbers The Rational Numbers are a field Rational Numbers are an integral domain, since all fields are integral domains What other properties.
Relations Chapter 9.
1 CSCI 2400 section 3 Models of Computation Instructor: Costas Busch.
Domain Theory, Computational Geometry and Differential Calculus Abbas Edalat Imperial College London With contributions from Andre.
Solving fixpoint equations
T. Mhamdi, O. Hasan and S. Tahar, HVG, Concordia University Montreal, Canada July 2010 On the Formalization of the Lebesgue Integration Theory in HOL On.
Abbas Edalat Imperial College London joint work with Marko Krznaric and Andre Lieutier Domain-theoretic Solution of Differential Equations.
Scott Closed Set Lattices And Applications 1. Some preliminaries 2. Dcpo-completion 3. Equivalence between CONP and CDL 4. The Hoare power domain 5. Scott.
General (point-set) topology Jundong Liu Ohio Univ.
استاد : دکتر گلبابایی In detail this means three conditions:  1. f has to be defined at c.  2. the limit on the left hand side of that equation has.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
ICS 253: Discrete Structures I
Chapter 3 L p -space. Preliminaries on measure and integration.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Robustness in Numerical Computation I Root Finding Kwanghee Ko School of Mechatronics Gwnagju Institute of Science and Technology.
MA4266 Topology Wayne Lawton Department of Mathematics S ,
TEL-AVIV UNIVERSITY RAYMOND AND BEVERLY SACKLER FACULTY OF EXACT SCIENCES SCHOOL OF MATHEMATICAL SCIENCES An Algorithm for the Computation of the Metric.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
MA5241 Lecture 1 TO BE COMPLETED
Practical Considerations When t , the supp, then there will be a value of t when supp folds, it becomes multi-w-to-one-x mapping.
1 ECG Saarbrücken Robustness issues & CAD André Lieutier Robustness issues in Geometric computations for Computer Aided Design André Lieutier practices.
Chapter 4 Hilbert Space. 4.1 Inner product space.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Mathematical Preliminaries
Lecture 2 Plan: 1. Automatic Boolean Algebras 2. Automatic Linear Orders 3. Automatic Trees 4. Automatic Versions of König’s lemma 5. Intrinsic Regularity.
Domain-theoretic Models of Differential Calculus and Geometry Abbas Edalat Imperial College London BRICS, February 2003 Contributions.
Domain Theory and Multi-Variable Calculus Abbas Edalat Imperial College London Joint work with Andre Lieutier, Dirk Pattinson.
Cardinality with Applications to Computability Lecture 33 Section 7.5 Wed, Apr 12, 2006.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Unit II Discrete Structures Relations and Functions SE (Comp.Engg.)
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Relations.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
2004/10/5fuzzy set theory chap03.ppt1 Classical Set Theory.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Dilworth’s theorem and extremal set theory 張雁婷 國立交通大學應用數學系.
Unit-III Algebraic Structures
Principles of GIS Fundamental spatial concepts – Part II Shaowen Wang
Chapter 3 The Real Numbers.
Complex Variables. Complex Variables Open Disks or Neighborhoods Definition. The set of all points z which satisfy the inequality |z – z0|
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
Lesson 5 Relations, mappings, countable and uncountable sets
Proposed in Turing’s 1936 paper
ICS 253: Discrete Structures I
Chapter 3 The Real Numbers.
Chapter 5: Morse functions and function-induced persistence
Presentation transcript:

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

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

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 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 The Convex Hull Algorithm A, B & C nearly collinear With floating point we can get:

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

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

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 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 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 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 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 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 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 Intersection of two 3D cubes

16 Intersection of two 3D cubes

17 Intersection of two 3D cubes

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 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 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 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 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 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.

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 Boolean operations and predicates Theorem All these operations and predicates are Scott continuous.

26 Subset Inclusion Subset inclusion is Scott continuous. Let

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 (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 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 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 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 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 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 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 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 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 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 The Convex Hull Algorithm

39 The Convex Hull Algorithm

40 The Convex Hull Algorithm

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 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.

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 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 Hausdorff computability However: Q  ([1,0]  [0, –1]) = [r,1]  {0}  R 2 is not Hausdorff computable. is Hausdorff computable.

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 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 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