I would like to draw a figure indicating a path being traversed on a fixed graph, like the following (red) loop on the given (black) graph:
which I produced in this case using the following terrible code:
\documentclass{amsart}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
[vertex/.style={circle, inner sep=0pt,minimum size=4mm}]
\node (A) [vertex] at (90:1) {};
\node (B) [vertex] at (330:1) {};
\node (C) [vertex] at (210:1) {};
\draw (A) circle (1mm);
\draw (B) circle (1mm);
\draw (C) circle (1mm);
\draw (A) -- (B) -- (C) -- (A);
\draw[red,->]
(A.30)
-- (B.30) arc (30:-90:2mm)
-- (C.270) arc (270:150:2mm)
-- (A.150);
\end{tikzpicture}
\end{document}
I would like do this in a less terrible way so that (a) it doesn't break when I change basic parameters like the node size or location, and (b) I don't have to calculate weird angles when the node placement is different or when the graph is more complicated, etc.
In general paths can be long and complicated, and they may backtrack or reuse edges, for example ABCBA describes a path on the graph above (once you label the nodes). I would like to be able to draw things like this.
My true hope is to have code and/or macros that let me relatively easily generate the red path from a sequence of graph nodes. I am willing to tinker and customize individual paths and am not expecting the whole process to be automated. In the resulting image, the whole path should be visible.
Thanks in advance for any suggestions.






