-
Notifications
You must be signed in to change notification settings - Fork 41
/
delaunay_tree_2d.html
324 lines (287 loc) · 9.12 KB
/
delaunay_tree_2d.html
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<html>
<head>
<title>
DELAUNAY_TREE_2D - Delaunay Triangulation of 2D Data
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055" >
<h1 align = "center">
DELAUNAY_TREE_2D <br> Delaunay Triangulation of 2D Data
</h1>
<hr>
<p>
<b>DELAUNAY_TREE_2D</b>
is a C++ program which
reads a file of point coordinates in 2D and produces a PostScript file containing
an image of the Delaunay triangulation of the points,
by Olivier Devillers.
</p>
<p>
<b>Warning:</b> A limitation of the program is that it assumes
that the user's input coordinates are "reasonable" PostScript coordinates!
Reasonable results will be achieved then if both X and Y coordinates
are positive and range from 0 to 1000 or so, say. On the other hand,
a user whose data is in the unit square will get a PostScript
file which actually plots the entire image in a near infinitesimal
and useless box! A reasonable fix is to rescale data so that it
lies between 0 and 612. (The PostScript coordinates, by default,
are in units of 1/72 inch, so 8.5 inches wide = 612.)
</p>
<p>
It would not be hard to correct the code so that the user can
input data with any scaling whatsoever, while the program would
(simple) just rescale it, or (better) insert the appropriate
PostScript scaling commands in the plot file.
</p>
<p>
In any case, the program is more interesting for being a
fairly clean embodiment of a Delaunay triangulation algorithm,
and the author himself suggests that a user might profitably
and easily modify the code to write out the information defining
the triangulation.
</p>
<h3 align = "center">
Usage:
</h3>
<p>
<dl>
<dt>
<b>delaunay_tree_2d</b> < <i>data.txt</i> > <i>data.ps</i>
</dt>
<dd>
reads the point coordinates from <i>data.txt</i> and writes
a PostScript image of the Delaunay triangulation to <i>data.ps</i>.
</dd>
</dl>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>DELAUNAY_TREE_2D</b> is available in
<a href = "../../cpp_src/delaunay_tree_2d/delaunay_tree_2d.html">a C++ version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/delaunay_lmap_2d/delaunay_lmap_2d.html">
DELAUNAY_LMAP_2D</a>,
a FORTRAN90 program which
reads in a pointset and
a linear map and writes out the Delaunay triangulation
for the linearly transformed data.
</p>
<p>
<a href = "../../cpp_src/geompack/geompack.html">
GEOMPACK</a>,
a C++ library which
computes the Delaunay triangulation
or Voronoi diagram.
</p>
<p>
<a href = "../../f_src/stripack/stripack.html">
STRIPACK</a>,
a FORTRAN90 library which
can compute the Delaunay
triangulation of a set of points on a sphere.
</p>
<p>
<a href = "../../cpp_src/table_delaunay/table_delaunay.html">
TABLE_DELAUNAY</a>,
a C++ program which
reads a
file of 2d point coordinates and computes the Delaunay triangulation.
</p>
<p>
<a href = "../../cpp_src/table_voronoi/table_voronoi.html">
TABLE_VORONOI</a>,
a C++ program which
can compute information about the
Voronoi diagram of a set of points stored in a file.
</p>
<p>
<a href = "../../cpp_src/triangulation_display_opengl/triangulation_display_opengl.html">
TRIANGULATION_DISPLAY_OPENGL</a>,
a C++ program which
reads files defining a triangulation and displays an image
using Open GL.
</p>
<p>
<a href = "../../f_src/tripack/tripack.html">
TRIPACK</a>,
a FORTRAN90 library which
can compute the Delaunay
triangulation of a set of points.
</p>
<h3 align = "center">
Author:
</h3>
<p>
Olivier Devillers
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
<a href = "http://www-sop.inria.fr/prisme/logiciel/index.html.en">
http://www-sop.inria.fr/prisme/logiciel/index.html.en
</a>
a software download site at INRIA.
</li>
<li>
Franz Aurenhammer,<br>
Voronoi diagrams -
a study of a fundamental geometric data structure,<br>
ACM Computing Surveys,<br>
Volume 23, Number 3, pages 345-405, September 1991.
</li>
<li>
Jean-Daniel Boissonnat, Monique Teillaud,<br>
On the randomized construction of the Delaunay tree,<br>
Theoretetical Computer Science,<br>
Volume 112, pages 339-354, 1993.
</li>
<li>
Olivier Devillers, Stefan Meiser, Monique Teillaud,<br>
Fully dynamic Delaunay triangulation in logarithmic expected
time per operation,<br>
Computational Geometry: Theory and Applications,<br>
Volume 2, Number 2, pages 55-80, 1992.
</li>
<li>
Olivier Devillers,
Robust and efficient implementation of the Delaunay tree,<br>
INRIA Research Report 1619, 1992.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "delaunay_tree_2d.cpp">delaunay_tree_2d.cpp</a>,
the source code;
</li>
<li>
<a href = "delaunay_tree_2d.sh">delaunay_tree_2d.sh</a>,
commands to compile and load the source code;
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<b>DEVILLERS_02_01000</b> is a set of 1000 points.
<ul>
<li>
<a href = "devillers_02_01000.txt">devillers_02_01000.txt</a>,
the point coordinates;
</li>
<li>
<a href = "devillers_02_01000.png">devillers_02_01000.png</a>,
a <a href = "../../data/png/png.html">PNG</a> image of
the file created by the program from the input data;
</li>
</ul>
</p>
<p>
<b>DIAMOND_02_00009</b> is a set of 9 points. Unfortunately,
the data is scaled to lie in the unit box, so <b>TABLE_SCALE</b>
was called to rescale both X and Y to lie between 0 and 612:
<ul>
<li>
<a href = "diamond_02_00009.txt">devillers_02_00009.txt</a>,
the point coordinates;
</li>
<li>
<a href = "diamond_scaled.txt">devillers_scaled.txt</a>,
the rescaled point coordinates;
</li>
<li>
<a href = "diamond_02_00009.png">diamond_02_00009.png</a>,
a <a href = "../../data/png/png.html">PNG</a> image of
the file created by the program from the input data;
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>"+"</b> is an overloading of the + operator to points.
</li>
<li>
<b>"-"</b> is an overloading of the - operator to points.
</li>
<li>
<b>"*"</b> is an overloading of the * operator to points.
</li>
<li>
<b>"^"</b> is an overloading of the ^ operator to points.
</li>
<li>
<b>DT_list::~DT_list</b> is the annihilator for class DT_list.
</li>
<li>
<b>DT_node::conflict</b> is true if the point is inside the closed circumdisk.
</li>
<li>
<b>point::lineto</b> writes a record to the PostScript file.
</li>
<li>
<b>DT_node::DT_node</b> ( void ) is a creation routine for class DT_node.
</li>
<li>
<b>DT_node::DT_node</b> ( DT_node* root, ind i ) is a creation routines for class DT_node.
</li>
<li>
<b>DT_node::DT_node</b> ( DT_node* f, point *c, ind i ) is a creation routine for class DT_node.
</li>
<li>
<b>DT_node::find_conflict</b> returns an alive node in conflict.
</li>
<li>
<b>DT_node:output</b> ?
</li>
<li>
<b>Delaunay_tree::output</b> outputs the Delaunay triangulation.
</li>
<li>
<b>DT_node::output2</b> ?
</li>
<li>
<b>Delaunay_tree::output2</b> outputs the Delaunay triangulation.
</li>
<li>
<b>Delaunay_tree::Delaunay_tree</b> ( void ) initializes the Delaunay tree.
</li>
<li>
<b>Delaunay_tree::~Delaunay_tree</b> is the destructor for class Delaunay_tree.
</li>
<li>
<b>Delaunay_tree::operator=+</b> is the insertion operator for class Delaunay_tree.
</li>
<li>
<b>MAIN</b> is the main program for delaunay_tree_2d.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 16 March 2006.
</i>
<!-- John Burkardt -->
</body>
</html>