![如何在 TikZ 中移动每个图片引用构造中的弧线?](https://linux22.com/image/366580/%E5%A6%82%E4%BD%95%E5%9C%A8%20TikZ%20%E4%B8%AD%E7%A7%BB%E5%8A%A8%E6%AF%8F%E4%B8%AA%E5%9B%BE%E7%89%87%E5%BC%95%E7%94%A8%E6%9E%84%E9%80%A0%E4%B8%AD%E7%9A%84%E5%BC%A7%E7%BA%BF%EF%BC%9F.png)
我的代码:
\documentclass{scrartcl}
\usepackage{stanli}
\usetikzlibrary{angles, quotes}
\begin{document}
\begin{tikzpicture}
%the points
\point{begin}{0}{0};
\point{end}{5}{0};
%the beam
\begin{scope}[dashed]
\beam{2}{begin}{end};
\end{scope}
%displaced points
\point{delta_begin}{.5}{.5};
\point{delta_end}{5.5}{1};
%displaced beam
\beam{2}{delta_begin}{delta_end};
%virtual displacements
\dimensioning{2}{begin}{delta_begin}{0}[$\delta y$];
\dimensioning{1}{begin}{delta_begin}{.5}[$\delta x$];
\draw
[dashed] (delta_begin) -- (5.5, .5);
%angle
\coordinate (A) at (5.5, .5);
\coordinate (B) at (delta_begin);
\coordinate (C) at (delta_end);
\pic[draw, angle radius = 10mm, "$\varphi$"] {angle};
\end{tikzpicture}
\end{document}
结果:
我的角度很小。phi 不适合线条之间。因此 phi 和弧应该向右移动。every pic quotes
您可以在手册第 255 页的第 18.2.1 节中找到构造的描述TikZ & PGF
。或者最好在这里使用arc
构造(第 152 页的第 14.7 节)。
提前感谢您的帮助和努力!
答案1
angle radius
令人惊讶的是,它会改变角度的半径。不太明显的是,angle eccentricity
它会影响标签相对于标记角度的线的位置。
\documentclass{scrartcl}
\usepackage{stanli}
\usetikzlibrary{angles, quotes}
\begin{document}
\begin{tikzpicture}
%the points
\point{begin}{0}{0};
\point{end}{5}{0};
%the beam
\begin{scope}[dashed]
\beam{2}{begin}{end};
\end{scope}
%displaced points
\point{delta_begin}{.5}{.5};
\point{delta_end}{5.5}{1};
%displaced beam
\beam{2}{delta_begin}{delta_end};
%virtual displacements
\dimensioning{2}{begin}{delta_begin}{0}[$\delta y$];
\dimensioning{1}{begin}{delta_begin}{.5}[$\delta x$];
\draw
[dashed] (delta_begin) -- (5.5, .5);
%angle
\coordinate (A) at (5.5, .5);
\coordinate (B) at (delta_begin);
\coordinate (C) at (delta_end);
\pic[draw, angle radius = 30mm, angle eccentricity=1.2, "$\varphi$"] {angle};
\end{tikzpicture}
\end{document}