vgs — vfplot graphic state file format


The vgs file format is used by the vfplot(1) program for representing the graphics state: a collection of arrows and neighbours.

The format is plain ASCII (which may be gzip compressed) and consists of a file header, an arrows section and a neighbours section.

The file header is a single line

# vgs 1.0

where the 1.0 denotes the major and minor versions of the format. This document describes version 1.0 of the format.

The arrows section has a header line which specifies the number of arrow lines to follow:

# arrows 237

Each arrow line consists of six floating point numbers separated by whitespace. These are the x and y-coordinates of the centre of the arrow, the angle that it is rotated from the positive x-axis, the centre-length of the shaft, the width of the shaft and the signed curvature (positive indicates rightward curvature). The units of length are as used in the input, angles are in radians.

The neighbours section has a header line giving the number of neighbour lines to follow

# nbs 142

Each neighbour line consists of two nodes, and each node consists of the node id, an integer, and the x and y-coordinates of the node, each a float.

Note that this representation contains some redundancy since the positions of nodes is often duplicated.


The following file is a syntactically correct (but nonsensical) vfplot graphics state.

# vgs 1.0
# arrows 4
0.124713 -0.124862 2.403796 0.212462 0.026558 -4.253056
-0.118501 -0.109490 -2.460052 0.205190 0.025649 -6.674025
-0.166165 -0.455388 -0.727073 0.284595 0.035574 -3.224060
0.212210 -0.396757 1.011023 0.269680 0.033710 -4.294210
# nbs 3
0 0.124713 -0.124862 179 0.033477 0.054706
0 0.124713 -0.124862 191 0.207476 -0.032645
0 0.124713 -0.124862 202 0.361048 -0.195918


J.J. Green ()


vfplot(1), gzip(1).