我该如何绘制下面的图形
答案1
以下是一种方法。很简单从 a 画到 b解决方案弯曲在每条线上。您还可以通过该(x1, y1) .. controls (x,y) .. (x2,y2)
方法绘制这些线,甚至可以尝试将它们绘制为数学函数。
最终如何操作取决于您自己。以下代码是如何在线的不同部分设置箭头的示例。您可以根据自己喜欢的创建线条的方式进行调整。
\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings, arrows}
\tikzset{
base/.style={
draw,
very thick,
postaction={decorate},
},
single/.style={
base,
decoration={markings, mark=at position .5 with {\arrow{triangle 45}}},
},
double/.style={
base,
decoration={markings, mark=at position .25 with {\arrow{triangle 45}}},
decoration={markings, mark=at position .75 with {\arrow{triangle 45}}},
},
}
\begin{document}
\begin{tikzpicture}
\draw [single] (0,0) to [bend left=20] ++(2,-2);
\draw [double] (.5,.5) to [bend left=25] ++(2,-2);
\draw [single] (1,1) to [bend left=20] ++(.75,-1.25);
\draw [single] (3,1) to [] ++(-1.25,-1.25);
\draw [single] (2.5,1) to [bend right=10] ++(-.75,-1.25);
\draw [single] (3.5,.5) to [bend left=10] ++(-1.75,-.75);
\draw [single] (3.5,0) to [bend right=50] ++(-.5,-1.5);
\end{tikzpicture}
\end{document}
代码生成: