The macro \EdgeDoubleMod
is convenient when drawing some complicated graphs. Consider the following picture of the line graph of the Petersen graph.
produced by:
\begin{tikzpicture} \SetVertexNormal[MinSize=12pt] \tikzset{VertexStyle/.append style= {inner sep=0pt,font=\footnotesize\sffamily}} \begin{scope}[rotate=-90] \grCirculant[RA=0.6,prefix=a]{5}{2} \end{scope} \begin{scope}[rotate=-18] \grEmptyCycle[RA=1.5,prefix=b]{5}{2} \end{scope} \begin{scope}[rotate=18] \grCycle[RA=2.5,prefix=c]{5} \end{scope} \EdgeIdentity{a}{b}{5} \EdgeIdentity{b}{c}{5} {\tikzset{EdgeStyle/.append style = {blue,line width=3pt}} \EdgeDoubleMod{b}{5}{0}{1}{a}{5}{2}{1}{5}} {\tikzset{EdgeStyle/.append style = {green,line width=2pt}} \EdgeDoubleMod{c}{5}{0}{1}{b}{5}{1}{1}{5}} \end{tikzpicture}
We construct the graph using tree cycles: a circulant, an “empty” cycle and a usual cycle. The code \EdgeIdentity{a}{b}{5}
just joins, for each from 0 to 4 (that is, five times) the vertex labeled to the vertex labeled .
Finally \EdgeDoubleMod{b}{5}{0}{1}{a}{5}{2}{1}{5}
joins, for each between 0 and 4 (that is the 5 in the last argument), the vertex labeled to the vertex labeled . In both cases, the sub-index is calculated mod 5 (because of the second and the sixth argument).
See also: Original Source by Rafael
Note: The copyright belongs to the blog author and the blog. For the license, please see the linked original source blog.
Leave a Reply
You must be logged in to post a comment.