Delaunator 1.0.11

dotnet add package Delaunator --version 1.0.11                
NuGet\Install-Package Delaunator -Version 1.0.11                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Delaunator" Version="1.0.11" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Delaunator --version 1.0.11                
#r "nuget: Delaunator, 1.0.11"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Delaunator as a Cake Addin
#addin nuget:?package=Delaunator&version=1.0.11

// Install Delaunator as a Cake Tool
#tool nuget:?package=Delaunator&version=1.0.11                

Delaunator C#

openupm

Fast Delaunay triangulation of 2D points implemented in C#.

This code was ported from Mapbox's Delaunator project (JavaScript). <p float="left" align="middle"> <img src="https://raw.githubusercontent.com/nol1fe/delaunator-sharp/master/Images/Delaunator_Unity_Example.gif" height="400" width="410"> <img src="https://raw.githubusercontent.com/nol1fe/delaunator-sharp/master/Images/Delaunator_Unity_Example_Mesh.gif" height="400" width="410"> </p>

Documentation

See https://mapbox.github.io/delaunator/ for more information about the Triangles and Halfedges data structures.

Unity Installation

Simply edit manifest.json file in your Unity Packages directory

{
  "dependencies": {
    "com.nol1fe.delaunator": "https://github.com/nol1fe/delaunator-sharp.git?path=DelaunatorSharp.Unity",
}

Unity Example

From UnityPackage Menager select Delaunator and press "Import into Project". <p float="left" align="middle"> <img src="https://raw.githubusercontent.com/nol1fe/delaunator-sharp/master/Images/Delaunator_Package%20Manager.png" height="300" width="450"> </p>

Burst Triangulator (optional)

For Unity developers seeking even greater performance and advanced triangulation capabilities, consider exploring BurstTriangulator.

Built with Unity's Burst compiler, it offers lightning-fast triangulation, making it ideal for large datasets and real-time applications.

WPF Example

There is available playground in DelaunatorSharp.WPF.Example project that shows examples of drawing Voronoi Diagram, Delaunay triangulation and Convex Hull

<p float="left" align="middle"> <img src="https://raw.githubusercontent.com/nol1fe/delaunator-sharp/master/Images/Delaunator_Rectangle.png" height="200" width="200"> <img src="https://raw.githubusercontent.com/nol1fe/delaunator-sharp/master/Images/Delaunator_Circle.PNG" height="200" width="200"> </p>

Points were generated with Poisson Disc Sampling implemented by UniformPoissonDiskSampler

Performance

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19043
11th Gen Intel Core i7-11800H 2.30GHz, 1 CPU, 16 logical and 8 physical cores .NET Core SDK=5.0.401
Method Count Type Mean Error StdDev
Delaunator 100000 Uniform 63.66 ms 21.68 ms 14.34 ms
Delaunator 100000 Gaussian 62.07 ms 21.60 ms 14.29 ms
Delaunator 100000 Grid 46.88 ms 18.53 ms 12.25 ms
Delaunator 1000000 Uniform 658.91 ms 41.11 ms 27.19 ms
Delaunator 1000000 Gaussian 680.02 ms 96.03 ms 63.52 ms
Delaunator 1000000 Grid 516.89 ms 60.64 ms 40.11 ms

NuGet

https://www.nuget.org/packages/Delaunator/

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 is compatible.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Delaunator:

Repository Stars
MeltyPlayer/FinModelUtility
Model viewer and command-line tools for extracting models from various GCN/3DS/PC games en-masse.

Fix obtaining points in GetEdgesOfTriangle