答案1
答案2
您的曲线似乎是由某些关键点的斜率定义的。该hobby
库是绘制此类曲线的绝佳工具,例如这里以查看选项。然后,您可以通过 指定 和in angle
斜率。out angle
tangent
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{hobby}
\begin{document}
\begin{tikzpicture}[tangent/.style={%
in angle={(180+#1)},Hobby finish,
designated Hobby path=next,out angle=#1},
pics/vert/.style={code={\draw (0,-0.1) -- (0,0.1) node[above]{#1};}}]
\draw [thick,use Hobby shortcut]
([out angle=45]0,0) pic{vert=1} .. ([tangent=0]1.5,1) pic{vert=2}
.. ([tangent=0]3,-0.25) pic{vert=3} .. ([in angle=225]4.5,1) pic{vert=4};
\end{tikzpicture}
\end{document}