Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#57 Make Delaunay triangulation example obvious #58

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,29 +151,29 @@ Public API is provided in two places:

### Code Examples

**Triangulation with constrained boundaries**
**Delaunay triangulation without constraints (triangulated convex-hull)**

<img src="./images/A.png" alt="Example of a triangulation with constrained boundaries and auto-detected holes" height="150"/>
<img src="./images/LakeSuperior.png" alt="Example of a triangulated convex hull" height="150"/>

```c++
// ... same as above
#include "CDT.h"
CDT::Triangulation<double> cdt;
cdt.insertVertices(/* points */);
cdt.insertEdges(/* boundary edges */);
cdt.eraseOuterTrianglesAndHoles();
cdt.eraseSuperTriangle();
/* access triangles */ = cdt.triangles;
/* access vertices */ = cdt.vertices;
/* access boundary edges */ = cdt.edges;
```

**Triangulated convex-hull**
**Constrained Delaunay triangulation (auto-detected boundaries and holes)**

<img src="./images/LakeSuperior.png" alt="Example of a triangulated convex hull" height="150"/>
<img src="./images/A.png" alt="Example of a triangulation with constrained boundaries and auto-detected holes" height="150"/>

```c++
#include "CDT.h"
CDT::Triangulation<double> cdt;
// ... same as above
cdt.insertVertices(/* points */);
cdt.eraseSuperTriangle();
cdt.insertEdges(/* boundary edges */);
cdt.eraseOuterTrianglesAndHoles();
/* access triangles */ = cdt.triangles;
/* access vertices */ = cdt.vertices;
/* access boundary edges */ = cdt.edges;
Expand Down