springgraph
Download latest version:
springgraph.pl
(older
versions)
Debian (unstable) package:
springgraph
BSD Port: springgraph
(5/12/02) Can now
generate 3D graphs !
Springgraph will read in a .dot file description of a
graph, which, for each node, specifies
its name and which other nodes it is
connected to, and then renders a graph. Each
node is drawn as an ellipse, and each
connection is drawn as an arrow. The node
placement is a result of all of the nodes
moving away from each other, while all nodes
which are connected move toward each other.
This movement is repeated until it
stabilizes.
Springgraph was written as an alternative
to neato, which is part of
graphviz. It attempts to read the same
.dot files used by graphviz, but currently
only supports a limited number of node
attributes (label and fillcolor). I am open
to requests for support for more
graph/node/edge attributes. I have used neato
quite a lot since September of 2000, when I
started writing programs to convert apache log files,
gpg/pgp keyring
signature relationships, and C include
relationships to .dot files to be graphed
with neato. 
Compare springgraph
and neato output.
Reasons I wanted an alternative to
neato:
- More appropriate math for what I graph,
resulting in better graph layouts: neato
uses line lengths - every node tries to be
a certain distance from every other node it
is connected to. To increase the size of
the graph (and eliminate node overlaps),
you must increase the default line length.
So in large graphs, all nodes try to be
some large distance from every other node.
In springgraph, every node tries to be as
close as possible to every node it is
connected to, while pushing away from every
node. I think this method is better suited
to the kinds of graphs I tend to generate,
like those of keyrings.
- neato is released under an (opensource)
license that is incompatible with the
GPL.
springgraph is released under the GPL.
- In the process of figuring out how to
write springgraph, I DID, as I had
hoped, learn how to output a graph in 3D.
Usage:
cat test.dot | ./springgraph.pl -s 3
> springgraph.png
The "-s 3" specifies the scale,
and is optional. All of the node locations
are multiplied by this. Increase the scale to
eliminate node overlaps. Decrease the scale
to make the graph smaller.
Definition of the input
(.dot) files that springgraph renders
The following programs generate .dot files
that are fully supported by springgraph:
Thiseveing (5/9/02) it occurred to me why
neato is the way it is - why its method is
sometimes more appropriate than the one I use
in springgraph. This happened as I was
testing springgraph with some of the graphviz
example files, and noticed that in
this graph, all of the lines
should be the same length, as they are
drawn by neato, not adjusted according to the
positioning of other nodes,
as they are drawn by
springgraph.
Comment
on this page.
Darxus' code index
Darxus' home page
Fri May 30 14:06:58 EDT 2003