Note: this is alpha-level software. It currently does not do anything.
Dang Qi Wu is a library of computer code to transform polygon shapes
into triangles.
It uses Angus Johnson's Clipper library and Mason Green (et al's)
poly2tri. Clipper is used as a pre-processor to clean up polygons for input
to poly2tri. The result is a sequence of triangles that cover the same
space as the polygon.
#include "dangqiwu.h"
#include <iostream>
int main ( int argc, char* argv[])
{
DangQiWu::Polygon pgon;
pgon << 0,0, 0,10, 10,10, 10,0;
std::vector<DangQiWu::Triangle> tris = pgon.find_triangles();
}
DangQiWu code is released under the Boost Software License. It contains
code from Clipper which is under it's own Boost Software License, which
has been included in the file LICENSE.Clipper. DangQiWu contains code
from poly2tri which is under poly2tri's own BSD-style license, which has
been included in the file LICENSE.poly2tri.
Note that binary redistributions of this code must contain the content
of the LICENSE.poly2tri file inside of their documentation, per the
poly2tri license.
Clipper is based on a paper by Bala R. Vatti of Lockheed Commercial
Electronics Co., Hudson, New Hampshire. Please see
http://www.angusj.com/delphi/clipper.php
http://en.wikipedia.org/wiki/Vatti_clipping_algorithm
Poly2Tri is based on a paper by Vid Domiter and Borut Žali, both from
the University of Maribor, in Slovenia. Please see
http://dl.acm.org/citation.cfm?id=1451778
http://code.google.com/p/poly2tri/
Other useful links: