Giter VIP home page Giter VIP logo

delaunator-sharp's Introduction

Delaunator C#

openupm

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

This code was ported from Mapbox's Delaunator project (JavaScript).

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".

WPF Example

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

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/

delaunator-sharp's People

Contributors

nol1fe avatar dchasman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.