3

So, after much painstaking research (for something that one feels should be simple) I figured out how to make angles in diagrams! The package I'm using is tkz-euclide, which seems simple enough to use.

However, whenever I'm making my force diagram, the angle is made outside the figure, instead of inside. Incorrect Angle Modeled on Bottom

Can anyone help me get the lower angle on the inside of the figure? I understand it's probably the arrows that are confusing tkz-euclide, but I need them. My entire code is below:

\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
    Swap the order of the coordinates? – Torbjørn T. May 5 '17 at 21:40
  • Yup @TorbjørnT. is right the angle is (D,E,C) instead of (C,E,D) – Moriambar May 5 '17 at 21:44
3

It has nothing to do with the arrows. Which of the two possible angles is marked is determined by the order in which you specify the coordinates in \tkzMarkAngle. Hence, you just need to use \tkzMarkAngle[fill=orange,size=0.5,opacity=.4](D,E,C) instead of \tkzMarkAngle[fill=orange,size=0.5,opacity=.4](C,E,D).

enter image description here

\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}
  • As soon are you made the comment right after I posted my question, I was shocked that that was the answer. It would certainly help if the documentation for tkz-euclide was not in French. Thanks so much, Torbjorn! – Coolio2654 May 5 '17 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.