首先,如果有人能想到更好的标题,请毫不犹豫地编辑它。:)
您会看到,我已经为力矢量生成了看起来相当合适的直线。我在计算了由于倾斜而产生的额外(负)长度后成功做到了这一点。有没有更优雅的方法使用 TikZ 自己的工具来实现这一点?
平均能量损失
\documentclass[
a4paper
]{scrartcl}
\usepackage{
lmodern,
booktabs,
tikz
}
\usepackage[T1]{fontenc}
\begin{document}
\begin{center}
\begin{tikzpicture}[font=\sffamily\small]
%
\draw[thick, rotate=-20] (0,0) rectangle (0.2,8);
%
\draw[thick, fill=black, rotate=-20] (0,4) circle (2pt);
%
%y - tan(20°) = GK (OS)/AK (AS) -> (tan 20) * 2 = 0.72894...
\draw[thick, ->, rotate=-20] (0,4) -- (-2,3.27106) node[left] {\(F_{y}\)};
%z
\draw[thick, ->, rotate=-20] (0,4) -- (0.72894,2) node[below] {\(F_{z}\)};
\end{tikzpicture}
\end{center}
\end{document}
图片
答案1
将节点放置coordinate
在矩形上的所需位置,稍后将其用作参考点
\documentclass[
a4paper
]{scrartcl}
\usepackage{
lmodern,
booktabs,
tikz
}
\usepackage[T1]{fontenc}
\begin{document}
\begin{center}
\begin{tikzpicture}[font=\sffamily\small]
%
\draw[thick, rotate=-20] (0,0) rectangle (0.2,8);
%
\draw[thick, fill=black, rotate=-20] (0,4) coordinate(aux) circle (2pt);
%
%y - tan(20°) = GK (OS)/AK (AS) -> (tan 20) * 2 = 0.72894...
\draw[thick, ->] (aux) -- ++(-3,0) node[left] {\(F_{y}\)};
%z
\draw[thick, ->] (aux) -- ++ (0,-3) node[below] {\(F_{z}\)};
\end{tikzpicture}
\end{center}
\end{document}