GRF_TO_EPS
Convert a GRF file to EPS format
GRF_TO_EPS is a FORTRAN90 program,
using double precision arithmetic,
which converts a GRF "graph" file (a format used
by the Combinatorica program) to a EPS image file.
In other words, it can draw a picture of an abstract graph.
Usage:
-
grf_to_eps file.grf file.eps
-
reads the GRF file file.grf and makes an Encapsulated
PostScript image file in file.eps.
Related Data and Programs:
EPS
is the Encapsulated PostScript format, which
is used when an image is to be printed
on a PostScript printer, or displayed with programs such as
GhostView or GhostScript.
GRF
is a data directory which
contains a description of the GRF format and some examples.
GRF_IO
is a FORTRAN90 library of routines for reading and writing GRF files.
PS_WRITE
is a FORTRAN90 library of routines to create PostScript images.
XGED
is an X-Window based editor for GRF files.
Reference:
-
Stephen Skiena,
Implementing Discrete Mathematics:
Combinatorics and Graph Theory in Mathematica,
Addison Wesley, 1990.
-
http://www.combinatorica.com/
the COMBINATORICA web page.
-
Peter Eades, Ian Fogg, David Kelly,
SPREMB: A System for Developing Graph Algorithms,
Congressus Numerantium,
Volume 66, December 1988.
Source Code:
Examples and Tests:
HEAWOOD is the Heawood graph:
KNIGHTSTOUR is the knight's tour graph:
PETERSEN is the Petersen graph:
TUTTE is the Tutte graph:
List of Routines:
-
MAIN is the main program for GRF_TO_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.
-
FILE_NAME_EXT_GET determines the "extension" of a file name.
-
FILE_NAME_EXT_SWAP replaces the current "extension" of a file name.
-
GET_UNIT returns a free FORTRAN unit number.
-
GRAPH_ARC_TO_EPS writes graph information to an Encapsulated PostScript file.
-
GRF_READ reads a GRF file containing a 2D representation of a graph.
-
GRF_TO_EPS creates an EPS image of the graph described by a GRF file.
-
I4_SWAP swaps two I4's.
-
POINT_INSIDE_BOX_2D determines if a point is inside a box in 2D.
-
PS_COLOR_FILL_SET sets the fill color.
-
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_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_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 real values.
-
S_EQI is a case insensitive comparison of two strings for equality.
-
S_INDEX_LAST finds the LAST occurrence of a given substring.
-
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.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 15 November 2006.