Title: A data Type for Computational Geometry
1A data Type for Computational Geometry Solid
Modelling
- Abbas Edalat André
LieutierImperial College
Dassault Systemes
2Aim
To develop a data type for CG SM
- Mathematically sound, realistic
- Bridges theory and practice
3Why 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!
4The Intersection of two lines
- With floating point arithmetic, find the point P
of the intersection L1 ? L2. Then
min_dist(P, L1) gt 0, min_dist(P,
L2) gt 0.
5The Convex Hull Algorithm
With floating point we can get
6The Convex Hull Algorithm
A, B C nearly collinear
With floating point we can get (i) AC,
or
7The Convex Hull Algorithm
A, B C nearly collinear
With floating point we can get (i) AC,
or (ii) just AB, or
8The Convex Hull Algorithm
A, B C nearly collinear
With floating point we can get (i) AC,
or (ii) just AB, or (iii) just BC, or
9The Convex Hull Algorithm
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.
10A Fundamental Problem in Topology and Geometry
- Subset A ? X topological space.Membership
predicate ?A X ? tt, ff - is continuous iff A is both open and closed.
- In particular, for A ? Rn, A ? ?, A ? Rn ?A
Rn ? tt, ff is not continuous. - Most engineering is done, however, in Rn.
11The Discontinuity of the Membership Predicate
- The basic building blocks of classical geometry
are not continuous and hence not computable in Rn.
12The Discontinuity of the Membership Predicate
- The basic building blocks of classical geometry
are not continuous and hence not computable in Rn.
- Example The point is in the box.
13Non-computability of the Membership Predicate
- There is a discontinuity if x goes through the
boundary.
False
True
14Non-computable Operations in Classical CG SM
- ?A Rn ? tt, ff not continuous means it is not
computable, even for simple objects like
A0,1n. - 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(Rn) ? C(Rn) ? C(Rn), where C(Rn) is compact
subsets with the Hausdorff metric.
15Intersection of two 3D cubes
16Intersection of two 3D cubes
17Intersection of two 3D cubes
18This 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.
19Elements 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.
- ?A is now a continuous function.
20Elements of a Computable Topology/Geometry
- Note that ?A?B iff int Aint B int
Acint Bc, 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 ? - Thenf 1tt is open its called the interior
of the object. f 1ff is open its called
the exterior of the object.
21Partial Solid Objects
- We have now introduced partial solid objects,
since X \ (f 1tt ? f
1ff)
may have non-empty interior. - We partially order the continuous functionsf, g
X ? tt, ff ? f ? g ? ?x ? X . f(x) ?
g(x) - f ? g ? f 1tt ? g 1tt f 1ff
? g 1ffTherefore, f ? g means g has more
information about an idealized real solid object.
22The 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 SO(X) of pairs of
disjoint open sets (O1,O2) ordered componentwise
by inclusion
23Properties of the Solid Domain
- Theorem For a (second countable) locally compact
Hausdorff space X (e.g. Rn), S(X) is (?)
continuous. - and (U1, U2) ltlt (V1, V2) iff U1 ? V1 U2
? V2 - Theorem If X is Hausdorff, then
(O1, O2) ?
Maximal (S X, ?) iff - O1 int O2c O2 int O1c.
- This is a regular solid object O1int O1
O2int O2 - Definition
- (O1, O2) , O1 ? Ø ? O2 , is a classical
object if O1 ? O2 X.
24Examples
- A x?R2 ? x 1 ? 1, 2represented in the
model by(int A, int Ac) ( x ? x lt 1, R2 \
A )is a classical (but non-regular) solid
object. - B x?R2 ? x 1represented by(x ? x lt
1 , x ? x gt 1) ? Maximal (SR2, ?)is a
regular solid object.
A
B
25Boolean operations and predicates
-
-
- Theorem All these operations and predicates are
Scott continuous. -
26Subset Inclusion
- Subset inclusion is Scott continuous.
27General Minkowski operator
- For smoothing out sharp corners of objects.
- SbRn (A, B) ? SRn Bc is bounded ?(Ø,Ø).
- All real solids are represented in SbRn.
- Define _?_ SRn ? SbRn ? SRn
((A,B) , (C,D)) ? (A ? C , (Bc ? Dc)c) where
A ? C ac a? A, c? C - Theorem _?_ is Scott continuous.
28An effectively given solid domain
- SX can be given effective structure for any
locally compact second countable Hausdorff space,
e.g. Rn, Sn, Tn, 0,1n. - Consider XRn. The set of pairs of disjoint open
rational polyhedra of the form K (L1 , L2),
gives a basis for SX. - Let Kn (p1 ( K n ) , p2 ( K n) ) be an
enumeration of basis. -
- (A, B) is a computable partial solid object if
there exists a total recursive function ß such
that -
-
(A , B) ( ?n p1 ( K ß(n) ) , ?n p2 (
K ß(n) ) )
29Computing 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.
30Computable 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.
31Quantative 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.
32Hausdorff Computability
- We strengthen the notion of a computable solid by
using the Hausdorff distance d between compact
sets in Rn. - d(C,D) min r C ? Dr D ? Cr
where Dr x ? y ? D.
x-y ? r -
33Hausdorff 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.
34Lebesgue Computability
(A , B) ? S k, kn is Lebesgue computable
iff there exists an effective chain K ß(n) of
basis elements with ß a total recursive
functions such that (A , B) ( ?n p1
( K ß(n) ) , ?n p2 ( K ß(n) ) ) µ(A) -
µ(p1 ( K ß(n) ) ) lt 1/2 n and µ(B) -
µ(p2 ( K ß(n) ) ) lt 1/2 n . The definition can
be extended to SRn. Theorem Boolean operations
are Lebesgue computable.
35Hausdorff and Lebesgue Computable Objects
- 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.
36Comparison of Various Notions of Computability
Partial solid in Rn Distance to a point Boolean operators Lebesgue measure
Computable semi-computable computable non-computable
Hausdorff computable computable non-computable non-computable
Lebesgue computable semi-computable computable computable
37The 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 )
38The Convex Hull Algorithm
39The Convex Hull Algorithm
40The Convex Hull Algorithm
41The Convex Hull map
- Let Hm (R2)m ? C(R2) be the classical convex
Hull map, with C(R2) the set of compact subsets
of R2. - Let (IR2,?) be the domain of rectangles in R2.
- Each rectangle T?IR2 has vertices T1,T2,T3,T4.
- For x(T1,T2,,Tm)?(IR2)m, define
- Cm (IR2)m ? SR2
- Cm(x)(Im(x),Em(x)) with
-
Em(x)(H4m((Ti1,Ti2,Ti3,Ti4))1?i?m)c
Im(x)Int(?Hm((Tif(i)))1?i?m) fNm?N4)
where Nk1,2,,k
42The Convex Hull is Computable!
- Theorem The map Cm (IR2)m ? SR2
- is Hausdorff and Lebesgue computable.
- Complexity
- Em(x) is O(m log m).
- Im(x) is O(m3) 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
44Further 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
45Hausdorff computability
is Hausdorff computable.
However Q?(1,0 ? 0, 1) r,1 ? 0 ? R2
is not Hausdorff computable.
46Hausdorff and Lebesgue computability
- Lebesgue computable ? Hausdorff computable
- Let 0 lt rn ? Q with rn ? r, left
computable, non-computable 0 lt r lt 1. - Then r,1 ? 0 ? R2 is Lebesgue computable but
not Hausdorff computable.
47Hausdorff and Lebesgue computability
- Hausdorff computable ? Lebesgue
computableComplement of a Cantor set with
Lebesgue measure - 1 r with r lim rn left computable,
non-computable. - start with
- stage 1
- stage 2
- At stage n remove 2n open mid-intervals of length
sn/2n.
0
1
s0
48Hausdorff Computability
- 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, kn is Hausdorff computable
- iff there exists an effective chain Kß(n) of
basis elements with ß a total recursive function
such that - (A , B) ( ?n p1 ( K ß(n) ) ,
?n p2 ( K ß(n) ) ) - with
- d (p1 ( K ß(n) ) , A ) lt 1/2 n , d (p2 (
K ß(n) ) , B) lt 1/2 n - d (p1 ( K ß(n) ) c, Ac) lt 1/2 n , d (p2 (
K ß(n) ) c , Bc) lt 1/2 n
49(No Transcript)