Provides an exact arithmetic 2d Delaunay triangulation of a point set.
Namespace:
ceometric.ComputationalGeometryAssembly: ceometric.ComputationalGeometry (in ceometric.ComputationalGeometry.dll) Version: 2.4.0.0 (2.4.0.0)
Syntax
C# |
---|
public class DelaunayTriangulation2d |
Visual Basic (Declaration) |
---|
Public Class DelaunayTriangulation2d |
Visual C++ |
---|
public ref class DelaunayTriangulation2d |
Remarks
A Delaunay triangulation maximizes the minimum angle of each triangle in the triangulation.
This class implements a fast and robust O(n*log(n)) randomized incremental
algorithm due to Guibas et al. using exact arithmetic.
This class uses eventing just to track the triangulation progress.
Examples
CopyC#
// instantiate a 2d Delaunay triangulation DelaunayTriangulation2d dt = new DelaunayTriangulation2d(); // assign the points to triangulate dt.TriangulationPoints = SamplePoints.SupershapeStarfish(10000); // compute the triangulation dt.Triangulate(); // add a point to the existing triangulation dt.AddPointToCurrentTriangulation(new Point(0.5,0.5,0)); // visualize Scene sc = new Scene(); Scene.Layer tLay = new Scene.Layer("Triangles", 1); sc.Add(dt.GetTriangles(), tLay); sc.WriteDxf(@"c:\Delaunay.dxf"); // Rasterize the current triangulation over a [0.01,0.01]-raster dt.RasterizeCurrentTriangulation(0.01, 0.01); // some properties of the triangulation Console.WriteLine(dt.NumberOfTriangles + " triangles created on " + dt.TriangulationPoints.Count + " raster points"); Console.WriteLine("Triangulated area: " + dt.Area); // visualize the rastered triangulation sc = new Scene(); Scene.Layer tLay = new Scene.Layer("Rastered_triangles", 1); sc.Add(dt.GetTriangles(), tLay); sc.WriteDxf(@"c:\Delaunay_rastered.dxf");
Inheritance Hierarchy
System..::.Object
ceometric.ComputationalGeometry..::.DelaunayTriangulation2d
ceometric.ComputationalGeometry..::.ConformingDelaunayTriangulation2d
ceometric.ComputationalGeometry..::.ConstraintDelaunayTriangulation2d
ceometric.ComputationalGeometry..::.DelaunayTriangulation2d
ceometric.ComputationalGeometry..::.ConformingDelaunayTriangulation2d
ceometric.ComputationalGeometry..::.ConstraintDelaunayTriangulation2d