• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.vscode/H30-Nov-2019-7675

poly2tri/H30-Nov-2019-2,8011,587

testbed/H30-Nov-2019-14,16513,990

unittest/H30-Nov-2019-9385

.gitignoreH A D30-Nov-2019156 1613

AUTHORSH A D30-Nov-2019145 94

LICENSEH A D30-Nov-20191.5 KiB2723

README.mdH A D30-Nov-20191.8 KiB7458

azure-pipelines.ymlH A D30-Nov-2019145 1411

meson.buildH A D30-Nov-2019679 2218

wafH A D30-Nov-2019102.4 KiB174132

wscriptH A D30-Nov-20191.2 KiB4733

README.md

1Since there are no Input validation of the data given for triangulation you need
2to think about this. Poly2Tri does not support repeat points within epsilon.
3
4* If you have a cyclic function that generates random points make sure you don't
5  add the same coordinate twice.
6* If you are given input and aren't sure same point exist twice you need to
7  check for this yourself.
8* Only simple polygons are supported. You may add holes or interior Steiner points
9* Interior holes must not touch other holes, nor touch the polyline boundary
10* Use the library in this order:
11  1. Initialize CDT with a simple polyline (this defines the constrained edges)
12  2. Add holes if necessary (also simple polylines)
13  3. Add Steiner points
14  4. Triangulate
15
16Make sure you understand the preceding notice before posting an issue. If you have
17an issue not covered by the above, include your data-set with the problem.
18The only easy day was yesterday; have a nice day. <Mason Green>
19
20TESTBED INSTALLATION GUIDE
21==========================
22
23Dependencies
24------------
25
26Core poly2tri lib:
27
28* Standard Template Library (STL)
29
30Testbed:
31
32* gcc
33* OpenGL
34* [GLFW](http://glfw.sf.net)
35* Python
36
37[waf](http://code.google.com/p/waf/) is used to compile the testbed.
38A waf script (86kb) is included in the repositoty.
39
40Building the Testbed
41--------------------
42
43Posix/MSYS environment:
44```
45./waf configure
46./waf build
47```
48
49Windows command line:
50```
51python waf configure
52python waf build
53```
54
55Running the Examples
56--------------------
57
58Load data points from a file:
59```
60p2t <filename> <center_x> <center_y> <zoom>
61```
62Random distribution of points inside a consrained box:
63```
64p2t random <num_points> <box_radius> <zoom>
65```
66Examples:
67```
68./build/p2t testbed/data/dude.dat 300 500 2
69./build/p2t testbed/data/nazca_monkey.dat 0 0 9
70
71./build/p2t random 10 100 5.0
72./build/p2t random 1000 20000 0.025
73```
74