使用 tikz 包增加边长

使用 tikz 包增加边长

有没有办法用 tikz 包制作这样的边缘 (E)。我知道我可以将它们弯曲到一定程度,但我想将它们做得尽可能大。感谢您的帮助。

enter image description here

答案1

您可以使用controls语法绘制贝塞尔曲线。在下面的例子中,我使用了相对坐标,因为这样很方便。需要注意的是,第一个控制点将相对于路径中的前一个坐标(此处a),而第二个控制点将相对于路径中的下一个坐标(此处b)。

enter image description here

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
\node [draw,circle] (a) {};
\node [draw,circle] (b) at (3,0) {};

\draw (a) .. controls +(0,1) and +(0,1) .. (b) node[midway,above] {E};
\draw [red] (a) .. controls +(0,3) and +(0,3) .. (b) node[midway,above] {E};
\draw [blue] (a) .. controls +(-2,4) and +(2,4) .. (b) node[midway,above] {E};
\end{tikzpicture}
\end{document}

相关内容