使用 LaTeX 箭头可将相切圆变为不相切圆

使用 LaTeX 箭头可将相切圆变为不相切圆

请考虑这个 LaTeX 文件:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
  \draw[->,thick] ({sqrt(2)},{sqrt(2)+2}) arc (45:225:2);
  \draw[->,thick] ({-sqrt(2)},{-sqrt(2)+2}) arc (225:405:2);
  \draw[->,thick] ({sqrt(2)+4},{sqrt(2)+2}) arc (45:225:2);
  \draw[->,thick] ({-sqrt(2)+4},{-sqrt(2)+2}) arc (225:405:2);
\end{tikzpicture}\par
\begin{tikzpicture}
  \draw[-LaTeX,thick] ({sqrt(2)},{sqrt(2)+2}) arc (45:225:2);
  \draw[-LaTeX,thick] ({-sqrt(2)},{-sqrt(2)+2}) arc (225:405:2);
  \draw[-LaTeX,thick] ({sqrt(2)+4},{sqrt(2)+2}) arc (45:225:2);
  \draw[-LaTeX,thick] ({-sqrt(2)+4},{-sqrt(2)+2}) arc (225:405:2);
\end{tikzpicture}
\end{document}

应该画两对相切的圆,圆上有箭头,其实每个圆都是由两个半圆组成,半圆末端有一个箭头。

我得到的是:

在此处输入图片描述

如您所见,第二对圆不相切。但是,这两对圆都是通过相同的过程创建的。唯一的区别是第二对圆使用 LaTeX 箭头,而第一对圆没有。

这是一个已知问题吗?如何避免这种情况?

答案1

如果你加载该bending库,它将按预期工作:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,bending}
\begin{document}
\begin{tikzpicture}
  \draw[->,thick] ({sqrt(2)},{sqrt(2)+2}) arc (45:225:2);
  \draw[->,thick] ({-sqrt(2)},{-sqrt(2)+2}) arc (225:405:2);
  \draw[->,thick] ({sqrt(2)+4},{sqrt(2)+2}) arc (45:225:2);
  \draw[->,thick] ({-sqrt(2)+4},{-sqrt(2)+2}) arc (225:405:2);
\end{tikzpicture}\par
\begin{tikzpicture}
  \draw[-LaTeX,thick] ({sqrt(2)},{sqrt(2)+2}) arc (45:225:2);
  \draw[-LaTeX,thick] ({-sqrt(2)},{-sqrt(2)+2}) arc (225:405:2);
  \draw[-LaTeX,thick] ({sqrt(2)+4},{sqrt(2)+2}) arc (45:225:2);
  \draw[-LaTeX,thick] ({-sqrt(2)+4},{-sqrt(2)+2}) arc (225:405:2);
\end{tikzpicture}
\end{document}

在此处输入图片描述

答案2

只是为了好玩,你可以使用decorations.markings库来代替所有那些计算。 装饰圆圈

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{decorations.markings}

\begin{document}
    \begin{tikzpicture}
        \tikzset{arrowedcircle/.style={
                    postaction=decorate,
                    decoration={
                    markings,
                    mark=between positions 0.125 and 1 step 0.5 with \arrow{latex}
                    }}}
        \draw[arrowedcircle] (0,0) circle (2cm);    
        \draw[arrowedcircle] (4,0) circle (2cm);
    \end{tikzpicture}
\end{document}

答案3

只是检查一下tzplot

在此处输入图片描述

\documentclass[border=1mm]{standalone} 

\usepackage{tzplot}

\begin{document}

\begin{tikzpicture}[scale=1.4]
\tzcircle[-->--=.125](0,0)(2)
\tzcircle[draw=none,-->--=.625](0,0)(2)
\tzcircle(4,0)(2)
\foreach \apos in {.125,.25,...,1}
{
  \settzmidarrow{Latex}[red,scale=1.5]
  \tzcircle[draw=none,-->--=\apos](4,0)(2)
}
\end{tikzpicture}

\end{document}

相关内容