Polygon triangulation algorithm with visualization
git submodule init
git submodule update
cd visualization
qmake && make
cd ..
qmake && make
Enter polygon by first specifying outer bound, and then by specifying inner bounds. Polygon must be correct, i.e. without self-intersections and with nonintersecting holes strictly inside polygon.
| Action | Key |
|---|---|
| Add next point to bound | double click |
| Finish bound | 'Space' |
| Discard current chain | 'Esc' |
| Reset everything | 'R' |
| Find triangulation | 'Enter' |
| Toggle triangle filling (off by default) | 'W' |
| Save polygon | 'S' |
| Load polygon | 'L' |