Giter Club home page Giter Club logo

delaunaypp's Introduction

delaunaypp

Codacy Badge

Introduction

A simple, easy to use implementation of Delaunay triangulation in 2D, written in C++.

This code based on Paul Bourke's implmentation of the Delaunay triangulation algorithm and is also strongly based on this C++ implementation.

demo gif

Building

To use the delaunay class all you need are the files. This is a header only library. To build the tests and the demo application you'll need CMake and Qt5. If you're on windows I recommend using vcpkg. You can find instructions on how to use vcpkg on windows with CMake here.

To build unit tests, ensure that BUILD_UNIT_TESTS is on. To build the demo application, ensure that BUILD_DEMO_APP is on.

Usage

The interface is quite simple: pass a point cloud (std::vector of points) to the delaunay object and then call triangulate().

Example:

using point = point<double>;
using triangle = triangle<double>;

std::vector<point> data = get_lots_of_points();

delaunaypp::delaunay<point> delaunay(data);
auto triangles = delaunay.triangulate();

// do something with the triangles.

I wrote this as a learning exercise, but if you find it useful feel free to use it! Feel free to contact me with any questions.

delaunaypp's People

Contributors

developerpaul123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

baucheng zeta1999

delaunaypp's Issues

Fix Google Test Auto Build on Windows

With the changes necessary to get the auto build of google test to work on linux, this broke some things in the windows build but only because the .dll files are not auto copied to the test executable's directory.

Simple fix is to just get the right file path and copy the files with a custom post build command via cmake in a if(MSVC) or if(WIN32) clause.

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.