Advertisement
Guest User

TikZ - Parallelogram Vector Rule

a guest
Sep 4th, 2021
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.26 KB | None | 0 0
  1. \documentclass[tikz]{standalone}
  2. \usepackage{libertinus,microtype,xcolor}
  3. \colorlet{cyanish}{cyan!25!}
  4. \usetikzlibrary{calc}
  5. \begin{document}
  6.   \begin{tikzpicture}
  7. \coordinate (A) at (0,0);
  8. \coordinate (B) at (3,2);
  9. \coordinate (C) at (6,1);
  10.  
  11. \coordinate (b) at (3,-1);
  12.  
  13. \draw[-stealth] (A) --node[sloped,above]{\(\vec{a}\)} (B);
  14. \draw[-stealth] (B) --node[sloped,above]{$\vec{b}$} (C);
  15. \draw[-stealth,gray] (A) --node[sloped,above]{\(\vec{b}\)} (b);
  16. \draw[-stealth,gray] (b) --node[sloped,above]{\(\vec{a}\)} (C);
  17. \draw[-stealth,red] (A) --node[sloped,above]{\(\vec{r}\)} (C);
  18.  
  19. \node[blue,anchor=south] at (B) {\(\alpha\)};
  20. \begin{scope}
  21. \clip (A) -- (B) -- (C) --cycle;
  22. \draw[blue] (B) circle [radius=2.5mm];
  23.  
  24. \draw[red] ($(A) + (0.2,0.2)$) circle [radius=4mm];
  25.  
  26. \end{scope}
  27.  
  28. \begin{scope}
  29.     \clip (A) -- (B) -- (C) -- (b) -- cycle;
  30.     \draw[orange] (A) circle [radius=3mm];
  31. \end{scope}
  32.  
  33. \node[orange,anchor=east] at (A) {\(\theta\)};
  34.  
  35. \node[red] at ($(A) + (0.8,0.27)$) {\(\gamma\)};
  36.  
  37. \node[draw,align=left] at (2.8,-2) {\textcolor{orange}{\(\theta = \text{Angle between vectors}\)}\\
  38. \textcolor{blue}{\(\alpha =\)Angle between vectors in parallelogram}\\
  39. \textcolor{red}{\(\gamma =\)Angle of resultant vector}};
  40. \end{tikzpicture}
  41. \end{document}
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement