因此,经过大量艰苦的研究(对于一些人们认为应该很简单的事情),我弄清楚了如何在图表中绘制角度!我使用的包是tkz-euclide
,它似乎足够简单易用。
但是,每当我绘制力图时,角度都是在图形外部绘制,而不是在图形内部。
有人能帮我得到图内下方的角度吗?我知道可能是箭头让人困惑tkz-euclide
,但我需要它们。我的完整代码如下:
\documentclass{article}
%\documentclass[tikz]{standalone}
\usepackage{tikz,tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{center}
\begin{tikzpicture}[>=latex]
\draw[style=help lines] ;
%% The lines for the figures, going from node to node.
\draw[thick] (-2.2,2.2) -- (0,0);
\draw[thick,->] (-2.2,2.2) -- (2,2.2);
\draw[thick,->] (0,0) -- (0,-3);
\draw[thick,->] (0,0) -- (1.5,-1.5);
\draw[thick,->] (1.5,-1.5) -- (0,-3);
\draw[thick,->] (.12,.12) -- (2,2);
\draw[thick,->] (.12,.12) -- (1.62, -1.38);
%% First batch of coordinates for the angle with the theta.
\coordinate (A) at (-2.2,2.2);
\coordinate (B) at (2,2.2);
\coordinate (C) at (0,0);
%% 2nd batch of coordinates for the angle with the lower theta.
\coordinate (D) at (1.5, -1.5);
\coordinate (E) at (0,-3);
%% Nodes set up for the various symbols around the figure.
\node (F) at (1.4,.9) {\(F_N\)};
\node (G) at (1.22,-.4) {\(F_\perp\)};
\node (H) at (1.13,-2.45) {\(F_\top\)};
\node (I) at (-.29, -1.50) {\(w\)};
%% The two angles are described here.
\tkzMarkAngle[fill=orange,size=0.7,opacity=.4](C,A,B)
\tkzLabelAngle[pos = 0.45](C,A,B){\({\theta}_0\)}
\tkzMarkAngle[fill=orange,size=0.5,opacity=.4](C,E,D)
\tkzLabelAngle[pos = 0.5](C,E,D){\({\theta}_u\)}
\end{tikzpicture}
\end{center}
\end{document}
答案1
它与箭头无关。标记两个可能的角度中的哪一个取决于您在 中指定坐标的顺序\tkzMarkAngle
。因此,您只需使用\tkzMarkAngle[fill=orange,size=0.5,opacity=.4](D,E,C)
而不是\tkzMarkAngle[fill=orange,size=0.5,opacity=.4](C,E,D)
。
\documentclass{article}
%\documentclass[tikz]{standalone}
\usepackage{tikz,tkz-euclide}
\usetkzobj{all}
\begin{document}
\begin{center}
\begin{tikzpicture}[>=latex]
\draw[style=help lines] ;
%% The lines for the figures, going from node to node.
\draw[thick] (-2.2,2.2) -- (0,0);
\draw[thick,->] (-2.2,2.2) -- (2,2.2);
\draw[thick,->] (0,0) -- (0,-3);
\draw[thick,->] (0,0) -- (1.5,-1.5);
\draw[thick,->] (1.5,-1.5) -- (0,-3);
\draw[thick,->] (.12,.12) -- (2,2);
\draw[thick,->] (.12,.12) -- (1.62, -1.38);
%% First batch of coordinates for the angle with the theta.
\coordinate (A) at (-2.2,2.2);
\coordinate (B) at (2,2.2);
\coordinate (C) at (0,0);
%% 2nd batch of coordinates for the angle with the lower theta.
\coordinate (D) at (1.5, -1.5);
\coordinate (E) at (0,-3);
%% Nodes set up for the various symbols around the figure.
\node (F) at (1.4,.9) {\(F_N\)};
\node (G) at (1.22,-.4) {\(F_\perp\)};
\node (H) at (1.13,-2.45) {\(F_\top\)};
\node (I) at (-.29, -1.50) {\(w\)};
%% The two angles are described here.
\tkzMarkAngle[fill=orange,size=0.7,opacity=.4](C,A,B)
\tkzLabelAngle[pos = 0.45](C,A,B){\({\theta}_0\)}
\tkzMarkAngle[fill=orange,size=0.5,opacity=.4](D,E,C)
\tkzLabelAngle[pos = 0.5](C,E,D){\({\theta}_u\)}
\end{tikzpicture}
\end{center}
\end{document}