Root/poly2d/README

1poly2d - Yet another 2D polygon library
2=======================================
3
4Why do we need another 2D polygon library, if there are already CGAL,
5Boost, Clipper, GPC, ... ?
6
7All the above are either written in a weird language, are under a
8non-Free license, or simply don't provide the feature set we need
9here. poly2d is written in C, doesn't depend on non-standard
10libraries, and is licensed under the GPL (will change to LGPL).
11
12poly2d serves itself liberally from code already in cameo but
13provides a simpler and cleaner interface. The first objective is
14to provide the tools to replace the (badly broken) area filling
15operation in cameo. Later, poly2d could replace more parts of
16cameo.
17
18poly2d puts more emphasis on simplicity than on performance. Some
19functions expect closed polygons that don't self-intersect. For now,
20it doesn't matter whether polygons are clockwise or counter-clockwise.
21The table below shows the capabilities
22
23Open Min. vertices
24| Concave
25| | Self-intersect
26| | | |
27Y Y Y 0 p2d_contains_poly(b), p2d_copy, p2d_free, p2d_free_all,
28            p2d_is_closed, p2d_no_intersect, p2d_reverse,
29            p2d_vertices, p2d_write_gnuplot, p2d_write_gnuplot_all
30Y Y Y 1 p2d_read_gnuplot
31- Y Y 0 p2d_simplify
32- Y - 3 p2d_is_cw
33- Y - 3 p2d_contains_point, p2d_contains_poly (a),
34- Y - 3 p2d_area*, p2d_offset*
35
36Not yet implemented:
37- p2d_simplify (low priority - the offsetting from CGAL already covers
38  the main use case)
39
40Not yet specified:
41- subtraction (do we actually need it ?)
42
43Other:
44- transform CGAL's idea of outer polygons into something we can use
45- check for memory leaks
46
47Prerequisite:
48libcgal-dev
49

Archive Download this file

Branches:
master



interactive