UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 7 Geometric Modeling Approximate.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Comments We consider in this topic a large class of related problems that deal with proximity of points in the plane. We will: 1.Define some proximity.
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
Motion Planning for Point Robots CS 659 Kris Hauser.
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Searching on Multi-Dimensional Data
CS16: Introduction to Data Structures & Algorithms
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
The Divide-and-Conquer Strategy
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
Computational Geometry and Spatial Data Mining
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Midterm Review Fri. Oct 26.
1cs542g-term Notes. 2 Meshing goals  Robust: doesn’t fail on reasonable geometry  Efficient: as few triangles as possible Easy to refine later.
1 Lecture 8: Voronoi Diagram Computational Geometry Prof. Dr. Th. Ottmann Voronoi Diagrams Definition Characteristics Size and Storage Construction Use.
Haptic Rendering using Simplification Comp259 Sung-Eui Yoon.
I/O-Algorithms Lars Arge Aarhus University February 27, 2007.
UMass Lowell Computer Science Graduate Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 3 Tuesday, 2/9/10 Amortized Analysis.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 4 Chapter 6: Arrangements Monday,
Bounding Volume Hierarchy “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presented by Mathieu Brédif.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
UMass Lowell Computer Science Graduate Analysis of Algorithms Prof. Karen Daniels Spring, 2009 Lecture 3 Tuesday, 2/10/09 Amortized Analysis.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 5: Voronoi Diagrams Monday, 2/23/04.
I/O-Algorithms Lars Arge University of Aarhus March 1, 2005.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Lecture 2 Chapter 2: Polygon Partitioning.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Project.
I/O-Algorithms Lars Arge Aarhus University March 5, 2008.
Point Location in Delaunay Triangulations. Inspiration: Graphics software wants to light a model and needs to know which face a light ray hits You moved.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling.
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Lecture 2 Chapter 2: Polygon Partitioning.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 6 Start of Part II Material Monday,
The Complexity of Algorithms and the Lower Bounds of Problems
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 8 Approximate Nearest Neighbor.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
Delaunay Triangulations Presented by Glenn Eguchi Computational Geometry October 11, 2001.
Data Structures for Computer Graphics Point Based Representations and Data Structures Lectured by Vlastimil Havran.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Surface Simplification Using Quadric Error Metrics Michael Garland Paul S. Heckbert.
B-trees and kd-trees Piotr Indyk (slides partially by Lars Arge from Duke U)
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
Computational Geometry Piyush Kumar (Lecture 10: Point Location) Welcome to CIS5930.
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.
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
1 Point Location Strategies Idit Haran
1 Overview (Part 1) Background notions A reference framework for multiresolution meshes Classification of multiresolution meshes An introduction to LOD.
Polygon Triangulation
Honors Track: Competitive Programming & Problem Solving Seminar Topics Kevin Verbeek.
Randomized Incremental Algorithm for Delaunay Triangulation (DT) CS Gates 219 October 19, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All.
Spatial Data Management
School of Computing Clemson University Fall, 2012
Bounding Volume Hierarchies and Spatial Partitioning
Computational Geometry
Distance Computation “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presentation by Julie Letchner.
Bounding Volume Hierarchies and Spatial Partitioning
Query Processing in Databases Dr. M. Gavrilova
Delaunay Triangulation & Application
Presentation transcript:

UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2001 Lecture 7 Geometric Modeling Approximate Nearest Neighbor Searching Monday, 4/23/01

Part 2 Advanced Topics ApplicationsManufacturingModeling/Graphics Wireless Networks VisualizationTechniques(de)RandomizationApproximationRobustnessRepresentationsEpsilon-net Decomposition tree

Literature for Part II

Geometric Modeling “Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator” Jonathan Richard Shewchuck

Goals ä Construct 2D mesh of triangles for geometric modeling that: ä avoids small angles ä constrained Delaunay triangulation ä is efficient in time and space ä careful choice of data structures & algorithm ä is robust ä adaptive exact arithmetic C code at

Approach: Overview ä Based on Ruppert’s Delaunay Refinement Algorithm ä Input: Planar Straight Line Graph (PSLG) ä collection of vertices and segments ä Step 1: Construct Delaunay triangulation of point set

Approach: Overview (continued) ä Step 2: ä Start with the Delaunay triangulation of the point set ä Add input segments ä segments become constraints ä constrained Delaunay triangulation some differences

Approach: Overview (continued) ä Step 3: ä Remove triangles from concavities ä “triangle-eating virus” ä Step 4: ä Refine mesh to satisfy additional constraints on triangle’s minimum ä angle size ä area

Step 1: Construct Delaunay Triangulation of Point Set ä Delaunay Triangulation Algorithms: ä O(nlogn) expected time: ä Randomized incremental insertion ä Edge flipping restores empty circle property ä O(nlogn) worst-case time: ä Compute Voronoi diagram, then dualize ä Fortune’s plane sweep (parabolic front) ä O(nlogn) worst-case time: ä Divide-and-Conquer ä alternating cuts Shewchuck experimental comparison [speed, correctness] fastest slowest [point location bottleneck] deBerg handout

Delaunay Triangulation Algorithms: Divide-and-Conquer ä O(nlogn) worst-case time ä Recursively halve input vertex set ä Stop when size = 2 or 3 ä Triangulate small set ä forms edge(s) or triangle ä Merge 2 triangulations ä Ghost triangles allow fast convex hull traversal ä Fit together like gear teeth

Step 2: Constrained Delaunay Triangulation ä Force mesh to conform to input line segments ä User Chooses Approach: ä Recursive segment subdivision ä Insert segment midpoint ä Flip edges to restore Delaunay (empty circle) property ä Constrained Delaunay triangulation (default) ä Insert entire segment ä Delete triangles it overlaps ä Retriangulate regions on each side of segment ä No new vertices are inserted

Step 4: Mesh Refinement ä Refine mesh to satisfy additional constraints on minimum triangle ä angle size ä area ä Insert new vertices ä Flip edges to restore Delaunay (empty circle) property ä Halting Issue: ä Halts for angle constraint <= 27 o ä May not halt for angle constraint >= 33.9 o

Step 4: Mesh Refinement (continued) ä Vertex Insertion Rules: ä Segment’s Diametral Circle ä smallest circle containing segment ä any point in the circle encroaches on segment ä split encroached segment ä insert vertex at midpoint ä Triangle’s Circumcircle ä circle through all 3 vertices ä bad triangle: ä angle too small ä area too large ä split bad triangle ä insert vertex at circumcenter

Step 4: Mesh Refinement (continued)

Implementation Issues: Representation ä Ghost triangles: ä connected in ring about a “vertex at infinity” ä facilitate convex hull traversal + Topologically richer + Elegant - Slower - More memory edge-based representation tradeoffs triangle-based - Topologically less rich - Longer code + Faster + Less memory Shewchuck preference

Implementation Issues: Robustness ä Tests ä Can influence program flow of control ä Can classify entities (e.g. sweep-line events) ä Depend on correctness of geometric predicates ä Orientation (left/right/on) ä In-Circle (in/out/on) ä Each computes sign of a determinant ä Constructions ä Represent geometric objects ä Often determine output incorrectness can be serious some incorrectness can sometimes be tolerated

Implementation Issues: Robustness (continued) ä Ideal Goal: real arithmetic for some operations ä Challenge: compounded roundoff error in floating- point arithmetic calculations: ä Tests: can cause program ä to hang ä to crash ä to produce incorrect output ä wrong topology ä Constructions: ä can cause approximate results What causes incorrectness?

Implementation Issues: Robustness (continued) ä Arithmetic Alternatives to Floating-Point: ä Integer or rational exact arithmetic ä fixed precision ä extended precision ä Floating point +   -testing ä robust topological decisions ä filter: ä identify adequate precision for an operation (bit complexity) ä if expressible as multivariate polynomial, degree gives clue ä floating-point comparisons except when correctness is threatened ä adaptive precision: ä compute quantity (e.g. sign of determinant) via successively more accurate approximations ä stop when uncertainty in result is small No single solution fits all needs. Collection of techniques is needed. slow but sure fast but loose exact floating-pt hybrid time vs. error tradeoff

Implementation Issues: Robustness (continued) ä Shewchuck uses: ä multi-stage adaptive precision for geometric primitives ä Orientation (left/right/on) ä In-Circle (in/out/on) ä Each ä computes sign of a determinant ä takes floating-pt inputs ä stops when uncertainty in result is small ä can reuse previous, less accurate approximations ä fast arbitrary precision arithmetic ä for small (yet extended) precision values For general discussion of robustness issues and alternatives, see Strategic Directions in Computational Geometry Working Group Report

Approximate Nearest Neighbor Searching “An Optimal Algorithm for Approximate Nearest Neighbor Searching in Fixed Dimensions” Arya, Mount, Netanyahu, Silverman, Wu

Goals ä Fast nearest neighbor query in d- dimensional set of n points: ä approximate nearest neighbor  distance within factor of (1+  ) of true closest neighbor ä preprocess using O(dnlogn) time, O(dn) space ä Balanced-Box Decomposition (BDD) tree  note that space, time are indepenent of   query in O(c d,   logn) time C++ code for simplified version is at

Approach: Distance Assumptions ä Use L p (also called Minkowski) metric ä assume it can be computed in O(d) time ä pth root need not be computed when comparing distances ä Approximate nearest neighbor  distance within factor of (1+  ) of true closest neighbor p*  Can change  or metric without rebuilding data structure

Approach: Overview ä Preprocess points: ä Balanced-Box Decomposition (BDD) tree ä Query algorithm: for query point q ä Locate leaf cell containing q in O(log n) time ä Priority search: Enumerate leaf cells in increasing distance order from q ä For each leaf cell, calculate distance from q to cell’s point ä Keep track of closest point p seen so far  Stop when distance from q to leaf > dist(q,p)/(1+  ) ä Return p as approximate nearest neighbor to q.

Balanced Box Decomposition (BBD) Tree ä Similar to kd-tree [Samet handout] ä Binary tree ä Tree structure stored in main memory ä Cutting planes are orthogonal to axes ä Alternating dimensions ä O(log n) height ä Subdivides space into regions of O(d) complexity using d- dimensional rectangles ä Can be built in O(dn log n) time x1x1 x4x4 x3x3 y1y1 x2x2 y2y2 y3y3 One possible kd-like tree for the above points (not a BDD tree, though) y1y1 x1x1 x1x1 2 7 y2y2 1 5 y2y2 y3y3 x2x2 8 9 x3x3 x4x < >=

Balanced Box Decomposition (BBD) Tree (continued) ä Distinguishing features of BBD tree: ä Cell is either ä d-dimensional rectangle or ä difference of 2 d-dimensional nested rectangles ä In this sense, BDD tree is like: ä Optimized kd-tree: partition points into roughly = sized sets ä While descending in tree, number of points on path decreases exponentially ä Specialized Quadtree: aspect ratio of box is bounded by a constant ä While descending in tree, size of region on path decreases exponentially ä Leaf may be associated with more than 1 point in/on cell: O(n) node ä Inner boxes are “sticky”: if it is close to edge, it “sticks” subdivision tree split shrink

Splitting a Box: Midpoint

Splitting a Box: Middle-Interval

Packing Constraint

Priority Search from Query Point

Incremental Distance [Arya, Mount93] ä Incrementally update distance from parent box to each child when split is performed ä Maintain sum of appropriate powers of coordinate differences between query point and nearest point of outer box ä Split: ä Closer child has same distance as parent ä Further child’s distance needs only 1-coordinate update (along splitting dimension) ä Makes a difference in higher dimensions!

Experiments Experiments generated points from a variety of probability distributions: UniformGaussianLaplaceCorrelated Gaussian Correlated LaplacianClustered GaussianClustered Segments

Experiments

Conclusions ä Algorithm is not necessarily practical for large dimensions ä But, for dimensions <= ~20, does well ä Shrinking helps with highly clustered datasets, but was not often needed in their experiments ä Only needed for 5-20% of tree nodes ä BBD tree (in paper’s form) is primarily for static point set ä But, auxiliary data structure could maintain changes

Project Update

Project ProposalMonday, 4/92% Interim ReportMonday, 4/235% Final PresentationMonday, 5/78% Final SubmissionMonday, 5/1410% 25% of course grade DeliverableDue Date Grade %

Guidelines: Final Submission ä Abstract: Concise overview (at most 1 page) ä Introduction: ä Motivation: Why did you choose this project? ä Related Work: Context with respect to CG literature ä Summary of Results ä Main Body of Paper: (one or more sections) ä Conclusion: ä Summary: What did you accomplish? ä Future Work: What would you do if you had more time? ä References: Bibliography (papers, books that you used) Well- written final submissions with research content may be eligible for publishing as UMass Lowell CS technical reports.

Guidelines: Final Submission ä Main Body of Paper: ä If your project involves Theory/ Algorithm: ä Informal algorithm description (& example) ä Pseudocode ä Analysis: ä Correctness ä Solutions generated by algorithm are correct ä account for degenerate/boundary/special cases ä If a correct solution exists, algorithm finds it ä Control structures (loops, recursions,...) terminate correctly ä Asymptotic Running Time and/or Space Usage

Guidelines: Final Submission ä Main Body of Paper: ä If your project involves Implementation: ä Informal description ä Resources & Environment: ä what language did you code in? ä what existing code did you use? (software libraries, etc.) ä what equipment did you use? (machine, OS, compiler) ä Assumptions ä parameter values ä Test cases ä tables, figures ä representative examples

Guidelines: Interim Report ä Structured like Final Submission, except: ä no Abstract or Conclusion ä fill in only what you’ve done so far ä can be revised later ä include a revised proposal if needed ä identify any issues you have encountered and your plan for resolving them