如何使用 TikZ 创建以下图像?
我使用以下代码创建了此图像,截取了输出的屏幕截图,然后通过擦除左侧菱形内的边缘来修改屏幕截图。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.markings}
\begin{document}
\begin{tikzpicture}[transform shape,node distance=1.4cm,semithick]
\node [draw, fill, shape=circle] (0) {};
\node [draw, fill, shape=circle] (1) [right of=0] {};
\path (1) edge[bend left,postaction={decorate, decoration={
markings,
mark=at position 0.99 with {\arrow[>=diamond,white] {>}; },
mark=at position 0.99 with {\arrow[>=open diamond] {>}; } } }] (0)
(0) edge[bend right,postaction={decorate, decoration={
markings,
mark=at position 0.99 with {\arrow[>=diamond,white] {>}; },
mark=at position 0.99 with {\arrow[>=open diamond] {>}; } } }] (1);
\end{tikzpicture}
\end{document}
答案1
你是指这样的吗?
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows,decorations.markings}
\begin{document}
\begin{tikzpicture}[transform shape,node distance=1.4cm,semithick]
\node [draw, fill, shape=circle] (0) {};
\node [draw, fill, shape=circle] (1) [right of=0] {};
\path (1) edge[bend left,postaction={decorate, decoration={
markings,
mark=at position 0.99 with {\arrow{diamond[fill=white]}; },
mark=at position 0.01 with {\arrowreversed{diamond[fill=white]}} } }] (0);
\end{tikzpicture}
\end{document}