答案1
因为这是一条曲线。您可以选择三个点并将它们连接起来。
(A) to [out=angle1,in=angle2] (B);
其中 A 和 B 是点,而 angle1 和 angle2 控制曲线进入和离开点的方式。
这是代码
\documentclass[border={10}]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0,0);
\coordinate (B) at (0,-1);
\coordinate (C) at (1,0);
\draw[very thick] (A) to [out=225,in=180,looseness=1.5] (B);
\draw[very thick] (B) to [out=0,in=270] (C);
\end{tikzpicture}
\end{document}
编辑:关于和in
,out
我将向您展示曲线离开 A 点的方式,其余部分将一目了然。关于looseness
,它使线条更加弯曲。尝试更改它以查看其效果。
选修的: 这是上面图片的代码
\documentclass[border={10}]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
[%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Circ/.style={circle,fill=blue,thick,
inner sep=0pt,minimum size=1mm}
]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\coordinate (A) at (0,0);
\coordinate (B) at (0,-1);
\coordinate (C) at (1,0);
\draw[very thick] (A) to [out=225,in=180,looseness=1.5] (B);
\draw[very thick] (B) to [out=0,in=270] (C);
\draw[red] (-.8,0) -- (1.5,0);
\draw[red] ( 0,.5) -- (0,-1.3);
\node [Circ,label={[xshift=-5mm]30:A}] at (A) {};
\node [Circ,label={[xshift=-5mm,yshift=-5mm]30:B}] at (B) {};
\node [Circ,label={[xshift=-5mm]30:C}] at (C) {};
\draw [green] (.1,0) arc (0:225:.1) node[xshift=-2.5mm,yshift=.15mm] {\tiny out} ;
\end{tikzpicture}
\end{document}
答案2
您可以使用..controls (coordinate) and (coordinate) ..
语法来绘制贝塞尔曲线。
\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (.35,.75);
\coordinate (B) at (.85,.75);
\coordinate (C1) at (-.4,.1);
\coordinate (C2) at (.86,.12);
\draw[red] (A) .. controls (C1) and (C2) .. (B);
\node[red,draw,fill,inner sep=1pt] at (A) {};
\node[red,draw,fill,inner sep=1pt] at (B) {};
\end{tikzpicture}
\end{document}
我把你的图像放在背景中以强调类比。