使用范围和旋转 tikz 时出现的问题

使用范围和旋转 tikz 时出现的问题

我希望用 tikz 旋转的图形拍摄这张照片 在此处输入图片描述

通常这种类型的方案不会问我问题,我写了下面的代码

\documentclass{article}

\usepackage{tikz}

\usetikzlibrary{calc,positioning}
\begin{document}

\begin{tikzpicture}[scale=0.02,y={(0,-1)}]

\node[circle,draw, minimum size=1em,label={O}](O) at (0,0){};
\node[circle,draw, minimum size=1em,label={left:A}](A) at (-100,160){};
\draw[black] (O) -| (A);
\begin{scope}[rotate=-15]

\node[circle,draw, minimum size=1em,red,label={below:C}](C) at (422,20){};
\draw[red] (O) -| (C);
%\draw (O) circle (422);
\end{scope}

\begin{scope}[shift={(A)}]
\node[circle,draw, minimum size=1em,blue,label={below:B}] (B) at (30:280){};
\draw[blue] (A) -- (B);
\draw[green] (B) -- (C);
\end{scope}
\end{tikzpicture}

 \end{document}

我得到了下面的图片

在此处输入图片描述

我不明白

  • \draw (O)-| (C) 为什么在C点有这个顺序?
  • 为什么旋转时不需要放置负角度,而到达B点呢?

我指定问题

下面的代码更准确地显示了这个问题

我希望在坐标 (422.20) 处放置一个节点,然后通过沿 x 和 y 方向的位移放置第一个节点,否则,节点在倾斜的图中不在坐标 (x, y) 中的同一位置,这样没问题!

\begin{tikzpicture}[scale=0.02,y={(0,-1)}]
\node[circle,draw, minimum size=1em,label={O}](O) at (0,0){};
\begin{scope}[rotate=-15]
%\node[circle,draw, minimum size=1em,red](C) at (422,20) {};
%
\draw (O) --(422,0) coordinate(D);
\path(D) --++(0,20) node[draw,circle,red,label={below:C2}](C2){};

\draw (O) -- (0,20) coordinate(E);
\path (E) --++(422,0)node[draw,rectangle,green,label={below:C3}](C3){};
\end{scope}

\draw (O) --(422,0) coordinate(D);
\path(D) --++(0,20) node[draw,circle,red,label={below:C2}](C2){};

\draw (O) -- (0,20) coordinate(E);
\path (E) --++(422,0)node[draw,rectangle,green,label={below:C3}](C3){};

\end{tikzpicture}

在此处输入图片描述

===========
我想我已经确定了问题所在,它来自于规模,规模= 1,不用担心!!

相关内容