6

I need to draw a theta angle from the positive x-axis, going around counterclockwise until I find the FR vector. The code below is what I already knew how to do, but I'm having difficulty with this angle.

\documentclass[border=5pt,tikz]{standalone}

\begin{tikzpicture}[scale=0.5]
    \draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
    \draw[->] (-5,0)--(5,0) node[right]{$x$};
    \draw[->] (0,-5)--(0,5) node[above]{$y$};
    \draw[blue,->,line width = 0.25mm] (0,0) -- (-2.7,-4.8)  node[left]{$FR$};
\end{tikzpicture}
1
  • with the quotes library see the answer below Commented Mar 26, 2021 at 10:36

3 Answers 3

7

You can make use of the fillbetween library that comes with pgfplots (See https://tex.stackexchange.com/a/239471/47927).

You need to name the paths of which you want to grab the intersections with name path=. Then you draw a new path with the option intersection segments and state the names of the pathes you previously assigned. You finally need to state which sequence you want to draw. L1 here means that you want the first segment of the path that is on the left side of the of statement (which is circ here).

\documentclass[border=5pt,tikz]{standalone}

\usepackage{pgfplots}
\usetikzlibrary{fillbetween}

\begin{document}

\begin{tikzpicture}[scale=0.5]
    \draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
    \draw[->] (-5,0)--(5,0) node[right]{$x$};
    \draw[->] (0,-5)--(0,5) node[above]{$y$};
    \draw[name path=fr, blue,->,line width = 0.25mm] (0,0) -- (-2.7,-4.8) node[left]{$FR$};
    
    \path[name path=circ] (0,0) circle (3);
    \draw[red, ->, intersection segments={of=circ and fr, sequence=L1}];
    \node[red] at (120:2.5) {$\theta$};
\end{tikzpicture}
    
\end{document}

enter image description here

5

enter image description here

\documentclass[border=5pt,tikz]{standalone}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{angles, quotes}
\begin{document}
    

    
    \begin{tikzpicture}[scale=0.5]
        \draw[help lines, color=gray!30, dashed] (-4.9,-4.9) grid (4.9,4.9);
        \draw[->] (-5,0)--(5,0) node[right,coordinate,label=right:$x$](x){};
        \draw[->] (0,-5)--(0,5) node[above]{$y$};
        \draw[blue,->,line width = 0.25mm] (0,0)coordinate(o) -- (-2.7,-4.8)  node[left, coordinate,label=below:$FR$](fr){};
        
        \pic[ draw,->,>=stealth,red!60!black, "$\theta_1$"{fill=white},inner sep=1pt, circle, angle eccentricity=1.1, angle radius = 10mm] {angle = x--o--fr};   
        
    \end{tikzpicture}
    
\end{document}
1
  • 3
    This is actually a better solution than mine. +1 Commented Mar 26, 2021 at 10:44
1

Using the tzplot package:

enter image description here

\documentclass[tikz]{standalone}
    
\usepackage{tzplot}

\begin{document}

\begin{tikzpicture}
\tzhelplines(-4.9,-4.9)(4.9,4.9)
\tzaxes(-5,-5)(5,5){$x$}{$y$}
\tzcoors(0,0)(O)(-2.7,-4.8)(P);
% \theta
\tzline[blue,->,line width = 0.25mm](O)(P){$FR$}[l]
\tzanglemark[red,->](O-|1,0)(O)(P){$\theta$}[pos=.9](2cm)
% \theta_1
\tzline[->](O)(3,2)
\tzanglemark[red,->](O-|1,0)(O)(3,2){$\theta_1$}(8mm)
\end{tikzpicture}

\end{document}

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.