Robust Geometric Computation - PowerPoint PPT Presentation

1 / 42
About This Presentation
Title:

Robust Geometric Computation

Description:

Reliable calculation. Interval arithmetic. Exact Arithmetic ... Can be done exactly if internal calculations are done with double-precision ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 43
Provided by: end167
Category:

less

Transcript and Presenter's Notes

Title: Robust Geometric Computation


1
Robust Geometric Computation
  • Eli Broadhurst

2
Define Robust
  • Full of health and strength vigorous.
  • Powerfully built sturdy.
  • Requiring or suited to physical strength or
    endurance robust labor.
  • Rough or crude boisterous a robust tale.
  • Marked by richness and fullness full-bodied a
    robust wine.

3
First a typical example
  • Polyhedral intersection

4
Numerical Errors in floating point numbers
  • Input conversion
  • Round-off
  • Digit-cancellation

5
Formal Definition
  • In geometric computations, logical facts such
    as incidence, separation, tangency, etc., are
    deduced based on numerical calculations. Further
    inferences are drawn from these deductions. The
    imprecision of floating-point arithmetic makes
    the conclusions drawn from the numerical
    calculations unreliable. In particular, the same
    logical question may arise repeatedly, in the
    form of different floating-point computations
    giving contradictory answers. Unless this
    problem is avoided, it is not possible to write
    fully correct/robust/reliable code for geometric
    operations using standard floating-point
    arithmetic.

6
What does this mean?
  • (approx.) numerical data vs. exact symbolic data
    (used for geometric reasoning).
  • Without robustness geometric programs cannot be
    layered or folded.

7
Solutions
  • Symbolic Reasoning
  • Give priority to one of the data structures
  • Exact Arithmetic
  • Reliable calculation
  • Interval arithmetic

8
What is a solution?
  • Exact positions of all primitives?
  • Consistent symbolic data?

9
A typical CS approach
  • Use an epsilon
  • Results are often sequence-dependent, not
    transitive, inaccurate, or inconsistent
  • Cannot have features smaller then 2 epsilon,
    good and bad

10
Symbolic Reasoning
  • Give priority to the symbolic data
  • Ask every question only once or make sure the
    answers agree
  • Symbolically reason, as part of the computation,
    which deductions have already been made
  • Non-trivial to prove an algorithm is robust,
    cognizant of all possibilities

11
Symbolic Reasoning
  • May not be correct
  • Sequence-dependent but consistent symbolic data
  • Exact implementation is too complex
  • Vertices of face are not all co-planar
  • Combine with epsilon approach

12
Symbolic Reasoning
  • Example
  • Voronoi diagram computation by Sugihara, 1994
  • May be incorrect but it always computes correct
    topological data structures and will never fail
  • www.mpi-sb.mpg.de/mehlhorn/ftp/ifip94.ps

13
Solutions
  • Symbolic Reasoning
  • Give priority to one of the data structures
  • Exact Arithmetic
  • Reliable calculation
  • Interval arithmetic

14
Exact Arithmetic
  • In 1969 MIT built Macsyma, uses exact rational
    arithmetic
  • Floating-point numbers ! real numbers
  • Proliferation
  • Irrationality

15
Proliferation
  • If the input to a geometric operation has k-digit
    precision, the output may require more
  • Compound Geometric Operations
  • Exponential growth

16
Irrationality
  • Rigid body motions
  • Translation
  • Rotation

17
Segment Intersection
  • Given endpoints with single-precision
  • Output Do they intersect?
  • Can be done exactly if internal calculations are
    done with double-precision

18
Computing the intersection
  • Need roughly triple precision to compute the
    actual intersection points
  • 3k 3

19
Exact Polyhedral Intersection
  • Only face (plane) information is given
    numerically, everything else symbolic
  • Triangle is defined by a main face and 3 side
    faces
  • Vertex is defined by the intersection of the main
    face with 2 other faces

20
Exact Poly. Intersection
  • Plane has equation
  • ax by cz d 0
  • Where L lt a,b,c lt L
  • -L2 lt d lt L2
  • L 2k
  • a,b, and c are defined by k bits
  • d by 2k bits

21
Exact Poly. Intersection
  • Why use double precision for d?

22
Exact Poly. Intersection
  • Boolean Operations
  • Always representable
  • All operations depend on intersection test of 4
    planes
  • No proliferation!
  • Vertices are always the at intersection of 3
    planes

23
Exact Poly. Intersection
  • Computing Vertices

24
Exact Poly. Intersection
  • Coordinates are rational
  • (Ux/D, Uy/D, Uz/D)
  • Needed precision?
  • Multiplication
  • ab lt a b 2k 2k 22k
  • Requires twice as many bits to represent
  • Addition
  • ab lt max(a,b) 1 2k1
  • Requires one more bit

25
Exact Poly. Intersection
  • For vertex calculation
  • Need 4k3 bits to do calculation and to
    represent as a rational number
  • 4k because d 22k
  • Precision needed for intersection of 4 planes?

26
Exact Poly. Intersection
  • If J 0 the 4 planes intersect
  • If J, D have same sign, planes 1,23 intersect
    above plane 4, else below
  • Needed precision?
  • J lt 24L5lt 25k5

27
Rigid motions
  • Translation
  • x1 x tx, y1 y ty, z1 z tz
  • Maps
  • axbyczd 0 -gt ax1by1cz1e 0
  • Where e atx bty ctz d
  • Representable only if
  • e lt L2

28
Rigid motions
  • Rotations
  • Only rational angles
  • And need to check a, b, c and make sure they are
    still lt L

29
Rounding
  • Can find the closest rational number to a real
    number by using continued fractions
  • Finding the closest plane to an unrepresentable
    one reduces to this same problem
  • No guarantee there exist representable grid lines
    that can bound all features (preserve topology)
  • Require minimum feature separation

30
Solutions
  • Symbolic Reasoning
  • Give priority to one of the data structures
  • Exact Arithmetic
  • Reliable calculation
  • Interval arithmetic

31
Interval arithmetic
  • We pretend to use real numbers, but really use a
    finite approximation
  • Definition of floating-point interval
  • x a,b where a,b are floating-point numbers
    and a lt b
  • x r ? R a lt x lt b
  • The key objective is to come up with an interval
    enclosure that is as tight as possible

32
First real intervals
  • Diameter d(x) ba
  • Midpoint m(x) (ba)/2
  • Smallest abs value ltxgt minx x ? x
  • Greatest abs value x maxx x ? x
  • 0 ? x iff ltxgt 0
  • Relative Diameter drel d(x)/ltxgt
  • x y ac, bd
  • x y a-d, b-c
  • x y minac,ad,bc,bd,
  • maxac,ad,bc,bd

33
Common Functions
  • Continuity -gt these are still intervals
  • x2 ltxgt 2, x 2
  • Sqrt(x) sqrt(a), sqrt(b)
  • ex ea, eb
  • Log(x) log(a), log(b)

34
Functions
  • f(x)?

35
Floating-point Intervals
  • The floating-point numbers must be rounded
    properly
  • Nearest machine-representable number
  • xy a ? c, b d
  • xy a ? d, b c
  • Some FPUs allow mode change to the appropriate
    rounding type

36
Floating-point Intervals
  • Do obtain automatic enclosure of a true result
  • Usefulness depends on how tight the interval is

37
Interval Bezier Curves
  • Control points have circular tolerance regions
  • Union of all possible control points

38
Conclusions
  • Exact computation
  • Problem of getting exact input data to be correct
  • Planarity of non-triangles
  • Avoided exponential growth of precision
  • Less special cases than when dealing with the
    looseness of floating-point
  • Works for Boolean operations, so so for
    translations and rotations
  • http//cs.nyu.edu/exact/

39
Conclusions
  • Symbolic Reasoning
  • Tries to make sense of imprecise data to find
    consistent interpretations
  • Hard to capture all cases, large programming
    effort
  • Not proven that it can confer absolute robustness

40
Conclusions
  • Interval Arithmetic
  • Encapsulates the correct answer
  • But there are cases when the enclosure is not
    sufficiently tight, and so have uncertainty in
    interpreting the results again

41
References
  • Robustness in Geometric Computations by C.
    Hoffmann, 2001
  • http//www.cs.purdue.edu/homes/cmh/distribution/pa
    pers/Robustness/JCISE01.pdf
  • Geometric and Solid Modeling by C. Hoffmann, 1989
  • http//www.cs.purdue.edu/homes/cmh/distribution/bo
    oks/geo.html

42
Floating-point numbers
  • Single-precision
  • 8-bit exponent
  • 23-bit mantissa
  • Double-precision
  • 11-bit exponent
  • 52-bit mantissa
Write a Comment
User Comments (0)
About PowerShow.com