forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dutch.html
373 lines (349 loc) · 10.8 KB
/
dutch.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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
<html>
<head>
<title>
DUTCH - Computational Geometry
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
DUTCH <br> Computational Geometry
</h1>
<hr>
<p>
<b>DUTCH</b>
is a FORTRAN90 library which
implements some of the computational
geometry routines from the reference.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/geometry/geometry.html">
GEOMETRY</a>,
a FORTRAN90 library which
contains many geometrical algorithms.
</p>
<p>
<a href = "../../f_src/geompack/geompack.html">
GEOMPACK</a>,
a FORTRAN90 library which
contain routines for Voronoi diagrams and Delaunay triangulations.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Marc de Berg, Marc van Kreveld, Mark Overmars,
Otfried Schwarzkopf,<br>
Computational Geometry,<br>
Springer, 2000.
</li>
<li>
Thomas Cormen, Charles Leiserson, Ronald Rivest,<br>
Introduction to Algorithms,<br>
MIT Press.
</li>
<li>
Albert Nijenhuis, Herbert Wilf,<br>
Combinatorial Algorithms,<br>
Academic Press, 1978, second edition,<br>
ISBN 0-12-519260-6.
</li>
<li>
Joseph O'Rourke,<br>
Computational Geometry,<br>
Cambridge University Press,<br>
Second Edition, 1998.
</li>
<li>
<a href = "http://www.cs.uu.nl/geobook/">
http://www.cs.uu.nl/geobook/</a>.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "dutch.f90">dutch.f90</a>, the source code.
</li>
<li>
<a href = "dutch.sh">dutch.sh</a>, commands to
compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "dutch_prb.f90">dutch_prb.f90</a>, a sample problem.
</li>
<li>
<a href = "dutch_prb.sh">dutch_prb.sh</a>, commands to
compile, link and run the sample problem.
</li>
<li>
<a href = "dutch_prb_output.txt">dutch_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>ANGLE_DEG_2D</b> returns the angle swept out between two rays in 2D.
</li>
<li>
<b>ANGLE_RAD_2D</b> returns the angle in radians swept out between two rays in 2D.
</li>
<li>
<b>CIRCLE_DIA2IMP_2D</b> converts a diameter to an implicit circle in 2D.
</li>
<li>
<b>CIRCLE_EXP2IMP_2D</b> converts a circle from explicit to implicit form in 2D.
</li>
<li>
<b>CIRCLE_IMP_CONTAINS_POINT_2D</b> determines if an implicit circle contains a point in 2D.
</li>
<li>
<b>CROSS0_2D</b> finds the cross product of (P1-P0) and (P2-P0) in 2D.
</li>
<li>
<b>I4_MODP</b> returns the nonnegative remainder of integer division.
</li>
<li>
<b>I4_SWAP</b> swaps two integer values.
</li>
<li>
<b>I4_UNIFORM</b> returns a pseudorandom I4.
</li>
<li>
<b>I4_WRAP</b> forces an integer to lie between given limits by wrapping.
</li>
<li>
<b>I4MAT_TRANSPOSE_PRINT</b> prints an I4MAT, transposed.
</li>
<li>
<b>I4MAT_TRANSPOSE_PRINT_SOME</b> prints some of the transpose of an I4MAT.
</li>
<li>
<b>I4VEC_FRAC</b> searches for the K-th smallest element in an N-vector.
</li>
<li>
<b>I4VEC_HEAP_A</b> reorders an array of integers into an ascending heap.
</li>
<li>
<b>I4VEC_HEAP_D</b> reorders an array of integers into an descending heap.
</li>
<li>
<b>I4VEC_HEAP_D_EXTRACT</b> extracts the maximum value from a descending heap.
</li>
<li>
<b>I4VEC_HEAP_D_INSERT</b> inserts a new value into a descending heap.
</li>
<li>
<b>I4VEC_HEAP_D_MAX</b> returns the maximum value in a descending heap of integers.
</li>
<li>
<b>I4VEC_INDICATOR</b> sets an integer vector to the indicator vector.
</li>
<li>
<b>I4VEC_MEDIAN</b> returns the median of an unsorted integer vector.
</li>
<li>
<b>I4VEC_POP</b> pops an integer vector off of a stack.
</li>
<li>
<b>I4VEC_PRINT</b> prints an integer vector.
</li>
<li>
<b>I4VEC_PUSH</b> pushes an integer vector onto a stack.
</li>
<li>
<b>I4VEC_SORT_HEAP_D</b> descending sorts an integer array using heap sort.
</li>
<li>
<b>I4VEC_SPLIT_UNSORT</b> "splits" an unsorted I4VEC based on a splitting value.
</li>
<li>
<b>IJ_NEXT</b> returns the next matrix index.
</li>
<li>
<b>IJ_NEXT_GT</b> returns the next matrix index, with the constraint that I < J.
</li>
<li>
<b>LINE_EXP2IMP_2D</b> converts an explicit line to implicit form in 2D.
</li>
<li>
<b>LINE_EXP_POINT_DIST_2D:</b> distance ( explicit line, point ) in 2D.
</li>
<li>
<b>LINE_EXP_POINT_DIST_SIGNED_2D:</b> signed distance ( explicit line, point ) in 2D.
</li>
<li>
<b>LINE_SEG_CONTAINS_POINT_2D</b> reports if a line segment contains a point in 2D.
</li>
<li>
<b>LINE_SEG_VEC_INT_2D</b> computes intersections of a set of line segments.
</li>
<li>
<b>LINES_EXP_INT_2D</b> determines where two explicit lines intersect in 2D.
</li>
<li>
<b>LINES_IMP_INT_2D</b> determines where two implicit lines intersect in 2D.
</li>
<li>
<b>LINES_SEG_DIST_2D</b> computes the distance of two line segments in 2D.
</li>
<li>
<b>LINES_SEG_INT_1D</b> computes the intersection of two line segments in 1D.
</li>
<li>
<b>LINES_SEG_INT_2D</b> computes the intersection of two line segments in 2D.
</li>
<li>
<b>PERM_PRINT</b> prints a permutation.
</li>
<li>
<b>PERM_RANDOM</b> returns a random permutation.
</li>
<li>
<b>POINTS_CONVEX_HULL_CUBIC_2D</b> computes the convex hull of 2D points.
</li>
<li>
<b>POINTS_CONVEX_HULL_NLOGH_2D</b> computes the convex hull of 2D points.
</li>
<li>
<b>POINTS_CONVEX_HULL_NLOGN_2D</b> computes the convex hull of 2D points.
</li>
<li>
<b>POINTS_MINIDISC1_2D</b> finds the smallest circle through Q containing points P.
</li>
<li>
<b>POINTS_MINIDISC2_2D</b> finds the smallest circle through Q1 and Q2 containing points P.
</li>
<li>
<b>POINTS_MINIDISC_2D</b> finds the smallest circle containing points P.
</li>
<li>
<b>POLY_TRIANGULATE_2D</b> returns a triangulation of a polygon.
</li>
<li>
<b>POLY_REORDER_NODES</b> reorders nodes of a polygon so node 1 is leftest lowest.
</li>
<li>
<b>POLYCON_MINKOWSKI_SUM_LINEAR</b> computes the Minkowski sum of two convex polygons.
</li>
<li>
<b>POLYCON_MINKOWSKI_SUM_N2LOGN2</b> Minkowski sums two convex polygons.
</li>
<li>
<b>R4_UNIFORM_01</b> returns a unit pseudorandom R4.
</li>
<li>
<b>R8_SWAP</b> swaps two R8's.
</li>
<li>
<b>R82VEC_PART_QUICK_A</b> reorders a R82VEC as part of a quick sort.
</li>
<li>
<b>R82VEC_SORT_QUICK_A</b> ascending sorts a R82VEC using quick sort.
</li>
<li>
<b>R8MAT_PRINT</b> prints an R8MAT.
</li>
<li>
<b>R8MAT_SOLVE</b> uses Gauss-Jordan elimination to solve an N by N linear system.
</li>
<li>
<b>R8MAT_TRANSPOSE_PRINT</b> prints an R8MAT, transposed.
</li>
<li>
<b>R8MAT_TRANSPOSE_PRINT_SOME</b> prints some of an R8MAT, transposed.
</li>
<li>
<b>R8MAT2_INVERSE</b> inverts a 2 by 2 real matrix using Cramer's rule.
</li>
<li>
<b>R8VEC_EQ</b> is true if two R8VEC's are equal.
</li>
<li>
<b>R8VEC_GT</b> == ( A1 > A2 ) for R8VEC's.
</li>
<li>
<b>R8VEC_LT</b> == ( A1 < A2 ) for R8VEC's.
</li>
<li>
<b>R8VEC_SWAP</b> swaps the entries of two R8VECs.
</li>
<li>
<b>R8VEC2_COMPARE</b> compares elements of an R8VEC2.
</li>
<li>
<b>R8VEC2_PRINT</b> prints a pair of real vectors.
</li>
<li>
<b>R8VEC2_SORT_A</b> ascending sorts a vector of pairs of integers.
</li>
<li>
<b>RADIANS_TO_DEGREES</b> converts an angle from radians to degrees.
</li>
<li>
<b>RECT_INT_2D</b> computes the intersection of two rectangles in 2D.
</li>
<li>
<b>SORT_HEAP_EXTERNAL</b> externally sorts a list of items into ascending order.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
<li>
<b>TRIANGLE_CONTAINS_POINT_2D</b> finds if a point is inside a triangle in 2D.
</li>
<li>
<b>TRIANGULATE_TRICOLOR</b> three-colors the nodes of a triangulated polygon.
</li>
<li>
<b>TRIANGULATE_COLOR_PUSH</b> pushes a side of a colored triangle onto the stack.
</li>
<li>
<b>TRIANGULATE_COLOR_POP</b> pops a side of a colored triangle from the stack.
</li>
<li>
<b>TRIANGULATE_COMMON_EDGE</b> seeks the other triangle that shares an edge.
</li>
<li>
<b>TRIANGULATION_BOUNDARY_COUNT</b> returns the number of boundary edges.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../f_src.html">
the FORTRAN90 source codes</a>.
</p>
<hr>
<i>
Last revised on 02 January 2011.
</i>
<!-- John Burkardt -->
</body>
</html>