从不同圆心的圆弧末端绘制圆弧

从不同圆心的圆弧末端绘制圆弧

我需要以 C2 为中心从 A 到虚线垂直线绘制一条圆弧。第一个圆弧中心是 C1。

\documentclass[10pt,a4paper]{scrbook}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node at (0:0){C1};
\node at (90:1){C2};

\draw[dashed] (0:0) -- (90:6);

\draw (90:2) arc (100:-130:2)node{A};

\end{tikzpicture}

\end{document}

答案1

我可能弄错了,但我将问题解释为一条连续的路径,所以它在这里;(无论如何你都可以将它们分开)

我们可以使用let语法,该语法允许您将节点坐标保存到宏中\p<number>,然后使用\x<number>和访问其组件\y<number>。这需要calc加载库。

\documentclass[10pt,a4paper]{scrbook}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}

\begin{tikzpicture}
\node at (0:0){C1};
\node (C2) at (90:1){C2};

\draw[dashed] (0:0) -- (90:6);

\draw (90:2) arc (90:-130:2)node(A){A} let \p1=($(A)-(C2)$),
                                         \n1={veclen(\x1,\y1)},
                                         \n2={atan2(\y1,\x1)}
      in arc (\n2:-270:\n1);


\end{tikzpicture}

\end{document}

在此处输入图片描述

答案2

您可以使用scope具有 移位的y=1cm

\documentclass[10pt,a4paper]{scrbook}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node at (0:0){C1};
\node at (90:1)(c2){C2};

\draw[dashed] (0:0) -- (90:6);

\begin{scope}[yshift=1cm]
\draw[ultra thick] (90:2cm) arc (90:-130:2cm)node{A};
\end{scope}
%\draw[red] (c2.center) circle (2cm);    %% Uncomment to check the center

\end{tikzpicture}

\end{document}

在此处输入图片描述

在此处输入图片描述

答案3

不确定这是否是正确的答案。

我从未见过 Tikz 坐标被定义为(0:0),所以我无法想象它到底是什么意思。

但是,我先画一个圆,得到正确的半径,作为原型。然后,我从前一个圆(蓝色)的末端和它的反圆(红色)画出圆弧。

\documentclass[10pt,a4paper,twocolumn]{scrbook}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
\node at (0:0){C1};
\node at (90:1){C2};

\draw[dashed] (0:0) -- (90:6);

\draw (90:2) arc (100:-130:2)node{A};

\end{tikzpicture}


% %
%   Draw circle to make sure we have the right radius
%
\vfil
\begin{tikzpicture}
    \node at (0:0){C1};
    \node(C2) at (90:1){C2};

    \draw[dashed] (0:0) -- (90:6);

    \draw (90:2) arc (100:-130:2)node(A){A};

    \draw[red] (C2) circle(2.7);

\end{tikzpicture}


% %
%   Draw arc from the end of the previous arc
%

\vfil
\begin{tikzpicture}
    \node at (0:0){C1};
    \node(C2) at (90:1){C2};

    \draw[dashed] (0:0) -- (90:6);

    \draw (90:2) arc (100:-130:2)node(A){A};

    \draw[blue] (A) arc (250:90:2.68);

\end{tikzpicture}


% %
%   Draw inverse of the new arc
%

\vfil
\begin{tikzpicture}
    \node at (0:0){C1};
    \node(C2) at (90:1){C2};

    \draw[dashed] (0:0) -- (90:6);

    \draw (90:2) arc (100:-130:2)node(A){A};

    \draw[blue] (A) arc (250:90:2.68);

    \draw[red] (A) arc (-110:90:2.68);

\end{tikzpicture}

\end{document}

在此处输入图片描述

相关内容