Ruppert's algorithm: Difference between revisions

Content deleted Content added
fixed reference and date links
Tag: Redirect target changed
 
(6 intermediate revisions by 5 users not shown)
Line 1:
#REDIRECT [[Delaunay refinement#Ruppert's algorithm]]
{{multiple image
| direction = vertical
| width = 350
| footer = Example of Ruppert's algorithm
| image1 = RuppertsAlgorithm-input.png
| alt1 = Ruppert's Algorithm input
| caption1 = Input planar straight-line graph
| image2 = RuppertsAlgorithm-output.png
| alt2 = Output conforming Delaunay triangulation
| caption2 = Output conforming Delaunay triangulation
}}
 
In [[mesh generation]], '''Ruppert's algorithm''', also known as '''Delaunay refinement''', is an [[algorithm]] for creating quality [[Delaunay triangulation]]s. The algorithm takes a [[planar straight-line graph]] (or in dimension higher than two a [[Piecewise linear manifold|piecewise linear]] system) and returns a conforming Delaunay triangulation of only quality triangles. A triangle is considered poor-quality if it has a circumradius to shortest edge ratio larger than some prescribed threshold.
Discovered by Jim Ruppert in the early 1990s,<ref>{{cite journal | doi=10.1006/jagm.1995.1021 | first=Jim | last=Ruppert | title=A Delaunay refinement algorithm for quality 2-dimensional mesh generation | journal=Journal of Algorithms | year=1995 | issue=3 | pages= 548–585 | volume=18}}</ref>
"Ruppert's algorithm for two-dimensional quality mesh generation is perhaps the first theoretically guaranteed meshing [[algorithm]] to be truly satisfactory in practice."<ref>{{cite web| last=Shewchuk| first=Jonathan| title=Ruppert's Delaunay Refinement Algorithm| url=http://www.cs.cmu.edu/~quake/tripaper/triangle3.html| date=12 August 1996| access-date=28 December 2018}}</ref>
 
== Motivation ==
 
When doing computer simulations such as [[computational fluid dynamics]], one starts with a model such as a 2D outline of a wing section.
The input to a 2D [[finite element method]] needs to be in the form of triangles that fill all space, and each triangle to be filled with one kind of material – in this example, either "air" or "wing".
Long, skinny triangles cannot be simulated accurately.
The simulation time is generally proportional to the number of triangles, and so one wants to minimize the number of triangles, while still using enough triangles to give reasonably accurate results – typically by using an [[unstructured grid]].
The computer uses Ruppert's algorithm (or some similar meshing algorithm) to convert the polygonal model into triangles suitable for the finite element method.
 
[[Image:RuppertsAlgorithm.ogv|thumb|350px|Intermediate triangulations of Ruppert's algorithm]]
 
== Algorithm description ==
 
The algorithm begins with a Delaunay triangulation of the input vertices and then consists of two main operations.
 
* The midpoint of a segment with non-empty diametral circles is inserted into the triangulation.
* The [[circumcenter]] of a poor-quality triangle is inserted into the triangulation, unless this circumcenter lies in the diametral circle of some segment. In this case, the encroached segment is split instead.
 
These operations are repeated until no poor-quality triangles exist and all segments are not encroached.
 
== Pseudocode ==
 
1 '''function''' Ruppert(''points'',''segments'',''threshold''):
2 ''T'' := DelaunayTriangulation(points);
3 ''Q'' := the set of encroached segments and poor quality triangles;
4 '''while''' ''Q'' '''is not''' empty: ''// The main loop''
5 '''if''' ''Q'' contains a segment ''s'':
6 insert the midpoint of ''s'' into ''T'';
7 '''else''' ''Q'' contains poor quality triangle ''t'':
8 '''if''' the circumcenter of ''t'' encroaches a segment ''s'':
9 add ''s'' to ''Q'';
10 '''else''':
11 insert the circumcenter of ''t'' into ''T'';
12 '''end if''';
13 '''end if''';
14 update ''Q'';
15 '''end while''';
16 '''return''' ''T'';
17 '''end''' Ruppert.
 
== Practical usage ==
 
Without modification Ruppert's algorithm is guaranteed to terminate and generate a quality mesh for non-acute input and any poor-quality threshold less than about 20.7 degrees. To relax these restrictions various small improvements have been made. By relaxing the quality requirement near small input angles, the algorithm can be extended to handle any straight-line input.<ref>{{cite journal| doi=10.1142/S0218195905001592| first1=Gary | last1=Miller | first2=Steven | last2=Pav | first3=Noel | last3=Walkington | title=When and why Delaunay refinement algorithms work | journal=International Journal of Computational Geometry and Applications | year=2005 | volume=15 | issue=1 | pages=25–54}}</ref> Curved input can also be meshed using similar techniques.<ref>{{cite conference
| last1 = Pav | first1 = Steven
| last2 = Walkington | first2 = Noel
| title = Delaunay refinement by corner lopping
| conference = Proceedings of the 14th International Meshing Roundtable
| pages = 165–181
| year = 2005 }}</ref>
Ruppert's algorithm can be naturally extended to three dimensions, however its output guarantees are somewhat weaker due to the sliver type tetrahedron.
 
An extension of Ruppert's algorithm in two dimensions is implemented in the freely available Triangle package. Two variants of Ruppert's algorithm in this package are guaranteed to terminate for a poor-quality threshold of about 26.5 degrees.<ref>{{cite journal | first1=Jonathan | last1=Shewchuk | title=Delaunay refinement algorithms for triangular mesh generation | journal=[[Computational Geometry (journal)|Computational Geometry: Theory and Applications]] | year=2002 | volume=22 | issue=1–3 | pages=21–74 | doi=10.1016/s0925-7721(01)00047-5}}</ref> In practice these algorithms are successful for poor-quality thresholds over 30 degrees. However, examples are known which cause the algorithm to fail with a threshold greater than 29.06 degrees.<ref>{{cite arXiv|last=Rand|first=Alexander|title=Improved Examples of Non-Termination for Ruppert's Algorithm|year=2011|eprint=1103.3903|class=cs.CG }}.</ref>
 
== See also ==
* [[Chew's second algorithm]]
* [[Local feature size]]
* [[Polygon mesh]]
* [[TetGen]]
* [[Voronoi diagram]]
 
== References ==
{{Reflist}}
 
== External links ==
* {{cite web
| last = Rineau | first = Laurent
| title = 2D Conforming Triangulations and Meshes
| url = http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Mesh_2/Chapter_main.html
| access-date=28 December 2018
}}
 
* {{cite web
| last = Shewchuk | first = Jonathan
| title = Triangle: A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator.
| url = http://www.cs.cmu.edu/~quake/triangle.html
| access-date = 28 December 2018
}}
 
* {{cite web
| last = Si | first = Hang
| title = TetGen: A Quality Tetrahedral Mesh Generator and a 3D Delaunay Triangulator
| url = http://wias-berlin.de/software/index.jsp?id=TetGen&lang=1
| date=2015
| access-date = 28 December 2018
| archive-url = http://wias-berlin.de/software/tetgen/
| archive-date = c. 2014
| dead-url=no
}}
 
[[Category:Mesh generation]]
[[Category:Triangulation (geometry)]]
[[Category:Articles containing video clips]]