dot-product-5.tex 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. \documentclass{article}
  2. \usepackage[pdftex,active,tightpage]{preview}
  3. \setlength\PreviewBorder{2mm}
  4. \usepackage{tikz}
  5. \usetikzlibrary{arrows,positioning, calc}
  6. \tikzset{
  7. %Define standard arrow tip
  8. >=stealth',
  9. % Define arrow style
  10. pil/.style={
  11. ->,
  12. thick}
  13. }
  14. \begin{document}
  15. \begin{preview}
  16. \begin{tikzpicture}[scale=0.8]
  17. % draw the background
  18. \draw [line width=0.1pt, fill=gray!2] (0,0) -- (3, 3) -- (5,0) -- cycle;
  19. % angle gamma
  20. \begin{scope}[shift={(3, 3)}]
  21. \draw[fill=green!30] (0,0) -- (-135:.75cm) arc (-135:-55:.75cm);
  22. \draw (-90:0.5cm) node {$\gamma$};
  23. \end{scope}
  24. \coordinate[label=left:$A$] (A) at (0,0);
  25. \coordinate[label=right:$B$] (B) at (5,0);
  26. \coordinate[label=above:$C$] (C) at (3,3);
  27. \
  28. \draw[->, very thick] (A) to[] node[above] {$\vec c$} (B);
  29. \draw[->, very thick] (C) to[] node[above] {$\vec b$} (A);
  30. \draw[->, very thick] (C) to[] node[above=0.1cm] {$\vec a$} (B);
  31. \coordinate[label=-90:$c$] (c) at ($(A)!0.5!(B)$);
  32. \coordinate[label=-120:$a$] (a) at ($(B)!0.5!(C)$);
  33. \coordinate[label=-45:$b$] (b) at ($(C)!0.5!(A)$);
  34. \end{tikzpicture}
  35. \end{preview}
  36. \end{document}