File: README

package info (click to toggle)
asc 2.6.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 81,592 kB
  • sloc: cpp: 158,704; sh: 11,544; ansic: 6,736; makefile: 606; perl: 138
file content (93 lines) | stat: -rw-r--r-- 3,215 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
	This program is an implementation of a fast polygon
triangulation algorithm based on the paper "A simple and fast
incremental randomized algorithm for computing trapezoidal
decompositions and for triangulating polygons" by Raimund Seidel.


	The algorithm handles simple polygons with holes. The input is
specified as contours. The outermost contour is anti-clockwise, while
all the inner contours must be clockwise. No point should be repeated
in the input. A sample input file 'data_1' is provided.


	The output is a list of triangles. Each triangle gives a pair
(i, j, k) where i, j, and k are indices of the vertices specified in
the input array. (The index numbering starts from 1, since the first
location v[0] in the input array of vertices is unused). The number of
output triangles produced for a polygon with n points is,
	(n - 2) + 2*(#holes)


	The algorithm also generates a qyery structure which can be
used to answer point-location queries very fast.

	int triangulate_polygon(...)
Time for triangulation: O(n log*n)
		
	int is_point_inside_polygon(...)	
Time for query        : O(log n)

	Both the routines are defined in 'tri.c'. See that file for
interfacing details.  If not used stand_alone, include the header file
"interface.h" which contains the declarations for these
functions. Inclusion of "triangulation.h" is not necessary.


	The implementation uses statically allocated arrays. Choose
appropriate value for SEGSIZE /* in triangulate.h */ depending on
input size.


	There sould not be any compilation problem. If log2() is not
defined in your math library, you will have to supply the definition.

	
USAGE:
	triangulate <filename> /* For standalone */


------------------------------------------------------------------
Bibliography:

@inproceedings{Sei90,
    author = "R. Seidel",
    title = "Linear Programming and Convex Hulls Made Easy",
    booktitle = "Proc. 6th Ann. ACM Conf. on Computational Geometry",
    address = {Berkeley, California},
    pages = {211--215},
    year = "1990"
}

@book{o-cgc-94
, author =      "J. O'Rourke"
, title =       "Computational Geometry in {C}"
, publisher =   "Cambridge University Press"
, year =        1994
, note =        "ISBN 0-521-44592-2/Pb \$24.95,
                ISBN 0-521-44034-3/Hc \$49.95.
                Cambridge University Press
                40 West 20th Street
                New York, NY 10011-4211
                1-800-872-7423
                346+xi pages, 228 exercises, 200 figures, 219 references"
, update =      "94.05 orourke, 94.01 orourke"
, annote =      "Textbook"
}



Implementation report: Narkhede A. and Manocha D., Fast polygon
 triangulation algorithm based on Seidel's Algorithm, UNC-CH, 1994.

-------------------------------------------------------------------

This code is in the public domain. Specifically, we give to the public
domain all rights for future licensing of the source code, all resale
rights, and all publishing rights.

UNC-CH GIVES NO WARRANTY, EXPRESSED OR IMPLIED, FOR THE SOFTWARE
AND/OR DOCUMENTATION PROVIDED, INCLUDING, WITHOUT LIMITATION, WARRANTY
OF MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE.


				- Atul Narkhede (narkhede@cs.unc.edu)