SWEEP2_VORONOI_EPS
Plot the SWEEP2 Voronoi Diagram
SWEEP2_VORONOI_EPS
is a FORTRAN90 program which
plots the
Voronoi diagram output from sweep2.
Usage:
-
sweep2_voronoi_eps voronoi_data graph
voronoi_data: is a text file containing a description of the
Voronoi diagram, output by sweep2. Each line describes either
a site, a vertex, an abstract line, or a Voronoi edge.
Indices are counted starting at 0.
graph: is an Encapsulated PostScript file containing an image of
the Voronoi diagram.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
SWEEP2_VORONOI_EPS is available in
a FORTRAN90 version.
Related Data and Programs:
SWEEP2,
a C program which
performs the Delaunay
triangulation of a set of points, by Steve Fortune.
SWEEP2_DELAUNAY_EPS,
a FORTRAN90 program which
produces an Encapsulated
PostScript image of the Delaunay triangulation of a set of points, as
processed by the SWEEP2 program.
Reference:
-
Franz Aurenhammer,
Voronoi diagrams -
a study of a fundamental geometric data structure,
ACM Computing Surveys,
Volume 23, pages 345-405, September 1991.
-
Steve Fortune,
A Sweepline Algorithm for Voronoi Diagrams,
Algorithmica, Volume 2, pages 153-174, 1987.
-
A copy of the original release of the SWEEP2 code is available through
NETLIB at
http://www.netlib.org/voronoi/sweep2
Source Code:
Examples and Tests:
DIAMOND is a simple pointset of 9 points:
TEST is a pointset of 100 points:
List of Routines:
-
MAIN is the main program for SWEEP2_VORONOI_EPS.
-
BOX_CLIP_LINE_2D uses a box to clip a line segment in 2D.
-
CH_CAP capitalizes a single character.
-
CH_EQI is a case insensitive comparison of two characters for equality.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
EPS_FILE_HEAD writes header information to an encapsulated PostScript file.
-
EPS_FILE_TAIL writes trailer information to an encapsulated PostScript file.
-
GET_FILENAMES gets the filenames from the command line or the user.
-
GET_UNIT returns a free FORTRAN unit number.
-
I4_SWAP swaps two I4's.
-
POINT_INSIDE_BOX_2D determines if a point is inside a box in 2D.
-
PS_CLIP defines a clipping polygon.
-
PS_COLOR_LINE handles the line color.
-
PS_COLOR_LINE_SET sets the line color.
-
PS_COMMENT inserts a comment into the PostScript file.
-
PS_DEFAULT sets the internal settings to their default values
-
PS_FILE_CLOSE closes a PostScript file.
-
PS_FILE_OPEN opens a new version of a PostScript file with a given name.
-
PS_FONT_SIZE sets the font size.
-
PS_LABEL prints a label at the current position.
-
PS_LINE draws a line segment from (X1,Y1) to (X2,Y2).
-
PS_LINE_CLOSED adds the graph of a closed line to a PostScript file.
-
PS_LINE_WIDTH sets the line width.
-
PS_MARK_DISK marks a point with a small filled disk.
-
PS_MARK_POINT marks a point with a tiny point.
-
PS_MOVETO "moves to" a new point, which becomes the current point.
-
PS_PAGE_HEAD writes header information on a new page.
-
PS_PAGE_TAIL writes tail information at the end of a page.
-
PS_SETTING_INT sets, gets, or prints integer internal PS_WRITE parameters.
-
PS_SETTING_REAL sets, gets, or prints real internal PS_WRITE parameters.
-
R8_SWAP swaps two R8's.
-
S_EQI is a case insensitive comparison of two strings for equality.
-
S_TO_I4 reads an I4 from a string.
-
S_TO_R8 reads an R8 from a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TIMESTRING writes the current YMDHMS date into a string.
-
VORONOI_EPS plots a Voronoi diagram.
-
VORONOI_DATA_READ reads the data from a Voronoi file.
-
VORONOI_HEADER_READ reads the header information from a Voronoi file.
-
WORD_EXTRACT extracts the next word from a string.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 13 November 2006.