Presentation is loading. Please wait.

Presentation is loading. Please wait.

UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling.

Similar presentations


Presentation on theme: "UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling."— Presentation transcript:

1 UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling

2 2D Mesh Generation Aspect Shewchuck Title Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator Source Conf:1 st Workshop on Applied CG, 1996 Application Areas geometric modeling; graphics Input Objects PSLG of object Aspect Shewchuck Dimensional ity 2D Problem/ Task (constrained) Delaunay triangulation; robustness Theory? Implementat ion? implementation ADTs & Data Structures triangular mesh; (constrained) Delaunay triangulation; Voronoi diagram; convex hulls; Guibas/Stolfi quad-edge; triangular data structure; PSLG; splaytree; heap Algorithmic Paradigms & Techniques sweep-line; geometric divide- and-conquer; incremental insertion Math Topics duality

3 Geometric Modeling “Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator” Jonathan Richard Shewchuck http://www.cs.cmu.edu/~jrs/jrspapers.html

4 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 http://www.cs.cmu.edu/~quake/triangle.html

5 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

6 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

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

8 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

9 Experimental Delaunay Triangulation Timings Note: Robust versions require more execution time.

10 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

11 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

12 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 <= 20.7 o ä May not halt for angle constraint >= 33.9 o

13 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

14 Step 4: Mesh Refinement (continued) Note: Figures are in left- to-right, top-to- bottom order

15 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

16 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 incorrectness can be serious some incorrectness can sometimes be tolerated

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

18 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 ä Shewchuck adaptive precision (logical extreme of filter): ä 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

19 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-point 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 Also see research by Prof. Victor Milenkovic: http://www.cs.miami.edu/~vjm.


Download ppt "UMass Lowell Computer Science 91.504 Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Geometric Modeling."

Similar presentations


Ads by Google