Skip to content

C++11 Delaunay triangulation implementation (Bowyer-Watson)

License

Notifications You must be signed in to change notification settings

jbegaint/delaunay-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++11 Delaunay implementation

Implementation of the Bowyer-Watson algorithm, heavily inspired from: http://paulbourke.net/papers/triangulate.

Delaunay triangulation demo

Requirements

  • C++11 compliant compiler
  • (OpenGL for the demo)

How to use

  • just include the delaunay.hpp header file
  • do not use in production, more efficient implementation of Delaunay's triangulation can be found elsewhere.

Example

  • ...
    #include "delaunay.hpp"
    ...
    std::vector<delaunay::Point<float>> points;
    /* Initialize the points. */
    ...
    /* Triangulate. */
    const auto triangulation = delaunay::triangulate(point);
    ...
    /* Do domething with the edges or the triangles. */
    for (auto const& e : triangulation.edges) {
    ...
    }
    ....
    
  • a working example can be found in the demo.cpp file, in addition the delaunay.hppheader file should be self-explanatory.

About

C++11 Delaunay triangulation implementation (Bowyer-Watson)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published