Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 928 Bytes

Readme.md

File metadata and controls

38 lines (28 loc) · 928 Bytes

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.