In the next MWE, I tried to clip by using a path drawn by edges between nodes, a circle, but I didn't succeed. It's not essential to draw it using automata
, though. But the point is:
being able to clip with a path made (custom) bent edges
path which, for instance, as in the MWE, can be drawn with edges between nodes. The circle thereafter should have been cropped by the path.
So I guess the solution is to redeclare the nodes as coordinates, draw a path between them and clip as usual. But then I lose the possibility of drawing with the edge-options (bending-angle)
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{automata}
\begin{document}
\begin{tikzpicture}
\node (A) at (1,1) {a};
\node (B) at (2,2) {b};
\node (C) at (3,1) {c};
\path[draw]
(A) edge[bend right=-30,red,->] (B)
(B) edge[bend right=-30,blue,dashed] (C)
(C) edge[bend right=-30,green,dotted] (A);
\begin{scope}[xshift=3cm]
\node (A) at (1,1) {a};
\node (B) at (2,2) {b};
\node (C) at (3,1) {c};
\path[clip]
(A) edge[bend right=-30,red,->] (B)
(B) edge[bend right=-30,blue,dashed] (C)
(C) edge[bend right=-30,green,dotted] (A);
\path[fill=blue!50] (2, 1.7) circle (.8);
\end{scope}
\end{tikzpicture}
\end{document}
What did go wrong? Why wasn't the circle cropped by the path? Can another process do this well? By adding -- cycle
it didn't work either.
The wanted effect, here manually adjusted, is something like:
The solution might need not to use automata
, as long as I can bend the (substitute of the) on each edge independently.
\path[clip]
(A) edge[bend right=-30,red,->] (B)
(B) edge[bend right=-30,blue,dashed] (C)
(C) edge[bend right=-30,green,dotted] (A) -- cycle;
\path[fill=blue!50] (2, 1.7) circle (.8);
to
instead ofedge
and remove the duplicated targes, but that will not give a path that follows that curved arrows. I would (1) update the question with a better explanation, (2) see if there is a better method. How is automata related to diff geo? (just out of curiosity)automata
-package to draw graphs. Some graphs encode manifolds (so-called GEMs), being this not the only constructon (way nicer yet: Groethendiek dessins d'enfant). With some luck, one can also illustrate your graph drawn on a manifold, which I try for a surface.