Classroom Examples of Robustness Problems in Geometric Computations

Slides:



Advertisements
Similar presentations
VC Dimension – definition and impossibility result
Advertisements

Computer Graphics- SCC 342
Computational Geometry
CS 450: COMPUTER GRAPHICS FILLING POLYGONS SPRING 2015 DR. MICHAEL J. REALE.
ADA: 15. Basic Math1 Objective o a reminder about dot product and cross product, and their use for analyzing line segments (e.g. do two segments.
Polygon overlay in double precision arithmetic One example of why robust geometric code is hard to write Jack Snoeyink & Andrea Mantler Computer Science,
Computational Geometry II Brian Chen Rice University Computer Science.
Convex Hull obstacle start end Convex Hull Convex Hull
Geometric Algorithms João Comba. Example: Convex Hull convex Non-convex.
Convex Hulls in Two Dimensions Definitions Basic algorithms Gift Wrapping (algorithm of Jarvis ) Graham scan Divide and conquer Convex Hull for line intersections.
Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R.
1 Convex Hull in Two Dimensions Jyun-Ming Chen Refs: deBerg et al. (Chap. 1) O’Rourke (Chap. 3)
Computational Geometry
Computational Geometry for the Tablet PC
1 Today’s Material Computational Geometry Problems –Closest Pair Problem –Convex Hull Jarvis’s March, Graham’s scan –Farthest Point Problem.
Algorithms and Data Structures Lecture 13. Agenda: Plane Geometry: algorithms on polygons - Verification if point belongs to a polygon - Convex hull.
5/17/2015 1:32 AMConvex Hull1 obstacle start end.
17. Computational Geometry Chapter 7 Voronoi Diagrams.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
1cs542g-term Notes. 2 Meshing goals  Robust: doesn’t fail on reasonable geometry  Efficient: as few triangles as possible Easy to refine later.
Delaunay Triangulation Computational Geometry, WS 2006/07 Lecture 11 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Computational Geometry
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
Computational Geometry Convex Hulls Robust Geometric Primitives Degeneracy and Stability Nick Pilkington.
CS 450: Computer Graphics REVIEW: OVERVIEW OF POLYGONS
Dobrina Boltcheva, Mariette Yvinec, Jean-Daniel Boissonnat INRIA – Sophia Antipolis, France 1. Initialization Use the.
October 14, 2014Computer Vision Lecture 11: Image Segmentation I 1Contours How should we represent contours? A good contour representation should meet.
Automatic Generation of Staged Geometric Predicates Aleksandar Nanevski, Guy Blelloch and Robert Harper PSCICO project
1 Ray Tracing Polyhedra ©Anthony Steed
Convex Hull. What is the Convex Hull? Imagine a set of points on a board with a nail hammered into each point. Now stretch a rubber band over all the.
Computational Geometry Course Summary (First Half) Spring 2008 Pay special attention to: algorithm details (able to explain correctness and carry out a.
Robustness in Numerical Computation I Root Finding Kwanghee Ko School of Mechatronics Gwnagju Institute of Science and Technology.
Intersection of Nonconvex Polygons Using the Alternate Hierarchical Decomposition, AHD by Rizwan Bulbul, and Andrew U. Frank Department of Geoinformation.
Lesson 3: Rotating Shapes. Some Things to Remember… Visualize how the shape is rotating Visualize how the shape is rotating What is a 90° turn? What is.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 Shewchuck 2D Triangular Meshing.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
CS6234 Advanced Algorithms - Convex hull. Terminologies – ◦ Convex hull of a set Q of points is the smallest convex polygon P for which each point in.
Computer Graphics CC416 Week 14 Filling Algorithms.
3D Rendering 2016, Fall.
A Divide-and-Conquer Algorithm for Delaunay Triangulation CS Gates 219 October 17, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All figures.
CSE 554 Lecture 1: Binary Pictures
Photorealistic Rendering vs. Interactive 3D Graphics
Image Morphing © Zooface Many slides from Alexei Efros, Berkeley.
A Geometry-Based Soft Shadow Volume Algorithm Using Graphics Hardware
Introduction to Polygons
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Convex Hull.
Query Processing in Databases Dr. M. Gavrilova
Algorithm design techniques Dr. M. Gavrilova
Class 17 front and back lighting convex sets, convex hull
© University of Wisconsin, CS559 Fall 2004
Localizing the Delaunay Triangulation and its Parallel Implementation
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
Computational Geometry Capter:1-2.1
Geometry.
Convex Sets & Concave Sets
Classroom Examples of Robustness Problems in Geometric Computations
Ray Tracing Polyhedra ©Anthony Steed
CMPS 3130/6130: Computational Geometry Spring 2017
Abstraction.
Classroom Examples of Robustness Problems in Geometric Computations
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Geometry.
Class 18 front and back lighting convex sets, convex hull
Computational Geometry
Presentation transcript:

Classroom Examples of Robustness Problems in Geometric Computations Lutz Kettner, Kurt Mehlhorn MPI für Informatik, Saarbrücken Stefan Schirra Otto-von-Guericke-Universität, Magdeburg Sylvain Pion INRIA, Sophia Antipolis Chee Yap New York University September 20, 2018

Overview Overview The Orientation Predicate A 2D Convex Hull Algorithm Classroom Examples ESA'04

Overview The algorithms of computational geometry are designed for a machine model with exact real arithmetic. Floating point arithmetic incurs round-off error Substituting floating point arithmetic for the assumed real arithmetic may cause implementations to fail. I will show you some drastic examples of failures due to roundoff error in the hope That you list more attentively to the alternatives presented later (and which require a fair amount of math) Classroom Examples ESA'04

Intersection of Four Simple Solids Rhino3D: ((( s1 ∩ s2) ∩ c2) ∩ c1) → successful ((( c1 ∩ c2) ∩ s1) ∩ s2) → ``Boolean operation failed'' Classroom Examples ESA'04

Intersection of Four Simple Solids output is a combinatorial object plus coordinates (not a point set) Rhino3D: ((( s1 ∩ s2) ∩ c2) ∩ c1) → successful ((( c1 ∩ c2) ∩ s1) ∩ s2) → ``Boolean operation failed'' Classroom Examples ESA'04

Overview …, I believe that the program fails due to floating point rounding errors, but the example is too complicated to be followed through in detail We do the following: First study the effect of floating point arithmetic on one of the basic geometric predicates, namely the orientation precidate for three points And then study the global effects on a simple 2d convex hull algorithm. Classroom Examples ESA'04

2D-Orientation of Three Points Orientation( p, q, r) = sign Orientation( p, q, r) = sign((qx-px)(ry-py) – (qy-py)(rx-px)) Implemented with IEEE 784 double precision float_orient (p, q, r) Float_orient is not a correct implementation of orientation. Classroom Examples ESA'04

2D-Orientation of Three Points Orientation( p, q, r) = sign((qx-px)(ry-py) – (qy-py)(rx-px)) 256x256 pixel image red=pos., yellow=0, blue=neg. What do you expect orientation evaluated with double Classroom Examples ESA'04

2D-Orientation of Three Points Orientation( p, q, r) = sign((qx-px)(ry-py) – (qy-py)(rx-px)) 256x256 pixel image red=pos., yellow=0, blue=neg. orientation evaluated with double Classroom Examples ESA'04

2D-Orientation of Three Points Orientation( p, q, r) = sign((qx-px)(ry-py) – (qy-py)(rx-px)) 256x256 pixel image red=pos., yellow=0, blue=neg. orientation evaluated with double Classroom Examples ESA'04

2D-Orientation of Three Points Orientation( p, q, r) = sign((qx-px)(ry-py) – (qy-py)(rx-px)) 256x256 pixel image red=pos., yellow=0, blue=neg. orientation evaluated with double Classroom Examples ESA'04

2D-Orientation of Three Points Orientation( p, q, r) = sign((qx-px)(ry-py) – (qy-py)(rx-px)) 256x256 pixel image red=pos., yellow=0, blue=neg. orientation evaluated with ext double Classroom Examples ESA'04

Classification with respect to two Lines consider p1 = ( 0.5, 0.5) p2 = ( 7.3000000000000194, 7.3000000000000167) p3 = ( 24.000000000000068, 24.000000000000071) p4 = ( 24.00000000000005, 24.000000000000053) (p2, p3, p4) form a counter-clockwise triangle Classification of (x(p1) + x∙u, y(p1) + y∙u) with respect to the edges (p2, p3) and (p4,p2). red = sees no edge, ocher = collinear with one, yellow = collinear with both, blue = sees one but not the other, green = sees both Classroom Examples ESA'04

Convex Hulls in the Plane r v2 maintain current hull as a circular list L=(v0,v1,...,vk-1) of its extreme points in counter-clockwise order start with three non-collinear points in S. consider the remaining points r one by one. Determine the set of visible edges If none, r is inside and we are done Otherwise, remove all visible edges and add the two tangents from r Classroom Examples ESA'04

Convex Hulls in the Plane maintain current hull as a circular list L=(v0,v1,...,vk-1) of its extreme points in counter-clockwise order start with three non-collinear points in S. consider the remaining points r one by one. Classroom Examples ESA'04

Correctness Properties v4 r v1 v3 v2 [Property A] A point r is outside CH iff there is an i such that the edge (vi, vi+1) is visible for r. (orientation(vi,vi+1,r) > 0) [Property B] If r is outside CH, then the set of edges that are weakly visible (= orientation is non-negative) from r forms a non-empty consecutive subchain; so does the set of edges that are not weakly visible from r. Classroom Examples ESA'04

… and next Instances leading to violations of properties (A) and (B) when executed with double’s and in all possible ways a point outside sees no edge a point inside sees an edge a point outside sees all edges a point outside sees a non-contiguous set of edges examples involve nearly collinear points, of course examples are realistic as many real-life instances contain collinear points (which become nearly collinear by conversion to double’s) Classroom Examples ESA'04

Global Consequences A point outside sees no edge of the current hull. p5=(8, 4) p6=(4, 9) p7=(15, 27) p8=(26, 25) p9=(19, 11) float_orient(p1,p2,p3) > 0 float_orient(p1,p2,p4) < 0 float_orient(p2,p3,p4) < 0 float_orient(p3,p1,p4) < 0 Classroom Examples ESA'04

Global Consequences A point outside sees all edges of the current hull. p1=(200, 49.200000000000003) p2=(100, 49.600000000000001) p3=(-233.33333333333334, 50.93333333333333) p4=(166.66666666666669, 49.333333333333336) float_orient(p1,p2,p3) > 0 float_orient(p1,p2,p4) > 0 float_orient(p2,p3,p4) > 0 float_orient(p3,p1,p4) > 0 Classroom Examples ESA'04

Global Consequences A point outside sees all edges of the current hull. p1=(200, 49.200000000000003) p2=(100, 49.600000000000001) p3=(-233.33333333333334, 50.93333333333333) p4=(166.66666666666669, 49.333333333333336) float_orient(p1,p2,p3) > 0 float_orient(p1,p2,p4) > 0 float_orient(p2,p3,p4) > 0 float_orient(p3,p1,p4) > 0 Depending on the implementation: Algorithm does not terminate! Algorithm crashes! Classroom Examples ESA'04

Global Consequences A point inside sees an edge of the current hull. (p1,p2,p3,p4) form a convex quadrilateral p5 is truly inside this quadrilateral, but float_orient(p4,p1,p5) > 0 p4 p5 p1 p2 p3 Classroom Examples ESA'04

Global Consequences A point inside sees an edge of the current hull. (p1,p2,p3,p4) form a convex quadrilateral p5 is truly inside this quadrilateral, but float_orient(p4,p1,p5) > 0 p5 p1 p4 p2 p5 p1 p2 p3 Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges float_orient(p4,p5,p6) > 0 float_orient(p5,p1,p6) < 0 float_orient(p1,p2,p6) > 0 p5 p1 p4 p2 p5 p1 p6 p2 p3 Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges Classroom Examples ESA'04

Global Consequences A point outside sees a non-contiguous set of edges Classroom Examples ESA'04

Conclusion Classroom examples Data sets and C++ programs available online: http://www.mpi-sb.mpg.de/~kettner/proj/NonRobust/ Long version (available soon): More analysis Graham’s scan algorithm 3D Delaunay triangulation Classroom Examples ESA'04