Debian Codegraph @

doc/smyrna/intro.tex

raw
1 \section{Introduction}
2 \label{sec:intro}
3
4 \smyrna\ is an application for viewing graphs. It allows the user
5 to open a window on a graph; navigate around the graph using pan
6 and zoom; and select nodes and edges with the mouse. The GUI provides various simple
7 mechanisms for changing the view of the graph and querying information about nodes and edges.
8 In addition, \smyrna\
9 allows the user to perform sophisticated querying and
10 manipulation of graphs.
11
12 Although it works with graphs of any size, \smyrna\ was
13 designed to handle large graphs, on the order of 100,000 nodes
14 and edges. It uses the OpenGL library which allows it to take advantage
15 of modern video cards' graphics rendering features.
16
17 \subsection{File Format}
18 \label{sec:files}
19 Currently, \smyrna\ supports only the Graphviz \DOT\ language.
20 Please refer to
21 \begin{center}
22 \url{https://www.graphviz.org/documentation/}
23 \end{center}
24 to get more information about the \DOT\ language of Graphviz and
25 the related attributes.
26
27 \smyrna\ assumes the input graph has position information
28 for all nodes. This is supplied by the {\tt pos} attribute, whose
29 format is two or three numbers separated by comma. Thus, for a
30 node {\tt start}, one might have
31 \begin{center}
32 {\tt start [pos="23.5,288"]}
33 \end{center}
34 If a graph is laid out using one of the Graphviz graph drawing programs,
35 the position information is attached in this manner. For example, running the
36 command
37 \begin{center}
38 {\tt sfdp -o outgraph.gv ingraph.gv}
39 \end{center}
40 will lay out the graph described in {\tt ingraph.gv} and create the file
41 {\tt outgraph.gv}, which can be used as input to \smyrna.
42
43 All \smyrna\ settings are stored as graph attributes.
44 For example, you can change the background color by setting the
45 {\tt bgcolor} attribute of the graph. Or the size of a
46 node can be altered by changing its {\tt size} attribute.
47 These attributes can be modified through the \smyrna\ GUI,
48 using the built-in scripting (cf.~\ref{sec:gvpr}),
49 or by simply changing the graph file itself.
50
51 Normally in \smyrna, nodes are represented by filled disks, which
52 can vary in size and color. For smaller graphs, \smyrna\
53 can render the more complex shapes and styles available in Graphviz.
54 This requires the nodes and edges in the graph to have the necessary
55 {\it xdot} attributes to describe the rendering. This can be achieved
56 by running the Graphviz layout with the {\tt -Txdot} flag, e.g.
57 \begin{center}
58 {\tt sfdp -Txdot -o outgraph.gv ingraph.gv}
59 \end{center}
60 For more information about {\it xdot} attributes and their formats,
61 see
62 \begin{center}
63 \url{https://www.graphviz.org/docs/outputs/canon/#xdot}
64 \end{center}
65
66 \subsection{Visualization Modes}
67 \label{sec:vizmodes}
68 {\it Smyrna} has three display modes:
69 2D, 3D and topological fisheye.
70 In 2D mode, the graph is displayed in the plane. Navigation is
71 limited to panning and zooming. Any third coordinate in a
72 node's {\tt pos} attribute is ignored.
73 In 3D mode, the graph is displayed using 3D graphics, allowing the
74 user to rotate about the graph in addition to panning and zooming.
75 Any node whose {\tt pos} attribute does not have a third coordinate
76 will be placed in the xy plane.
77
78 The topological fisheye mode~\cite{topfish} presents a
79 distorted, fisheye view of the
80 graph, in which the areas of the graph near to one or more focus nodes
81 are shown accurately, while the areas of the graph away from the foci
82 become more ``compressed'' the further they are from the foci.
83 For large graphs, this allows the user to see areas of interest clearly
84 and in detail, while eliding detail away from the foci.
85 Unlike ordinary fisheye techniques, in which
86 the distortion is done geometrically, with remote nodes being
87 drawn on top of each other,
88 topological fisheye is a specialized type of semantic zoom in which
89 remote nodes are combined into meta-nodes with induced edges, thereby
90 maintaining the graph's topology in a coarsened form.
91
92 \subsection{Querying, Filtering and Modifying Graphs}
93 Beyond the simple viewing and navigating around a graph, \smyrna\
94 also provides machinery for querying properties of the graph, modifying
95 the graph and creating new graphs. The main engine for this is \gvpr,
96 a scripting language specifically designed to edit graphs. By using
97 \gvpr, you can do almost anything related to graphs, from counting
98 the number of nodes with an attribute matching a given regular expression to
99 fairly complex graph algorithms.
100
101 One can use \gvpr\ to read and write files. In particular, \gvpr\ scripts
102 can write to {\tt stdout}. This is implemented in \smyrna\ but a console
103 window, which is part of the \gvpr\ control tab (Section~\ref{sec:gvprtab}).
104
105 When \gvpr\ changes the structure or attributes of the active graph,
106 these changes are reflected in \smyrna. Conversely, nodes and edges
107 that are selected have an attribute {\tt selected=1}, which \gvpr\
108 can use to provide actions on selected nodes and edges.
109
110 The use of \gvpr\ is discussed in more detail in Section~\ref{sec:gvpr}.
111