equilateral-triangle.tex 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. \documentclass[varwidth=true, border=2pt]{standalone}
  2. \usepackage{tikz}
  3. \usetikzlibrary{positioning, calc}
  4. \begin{document}
  5. \begin{tikzpicture}[scale=0.8]
  6. % draw the background
  7. \draw [line width=1.5pt, fill=gray!2] (0,0) -- (60:4) -- (4,0) -- cycle;
  8. \coordinate[label=left:$A$] (A) at (0,0);
  9. \coordinate[label=right:$B$] (B) at (4,0);
  10. \coordinate[label=above:$C$] (C) at (2,3.464);
  11. \coordinate[label=below:$c$](c) at ($ (A)!.5!(B) $);
  12. \coordinate[label=left:$b$] (b) at ($ (A)!.5!(C) $);
  13. \coordinate[label=right:$a$](a) at ($ (B)!.5!(C) $);
  14. % angle alpha
  15. \draw[fill=green!30] (0,0) -- (0:0.75cm) arc (0:60:.75cm);
  16. \draw (0.35cm,0.25cm) node {$\alpha$};
  17. % angle beta
  18. \begin{scope}[shift={(4cm,0cm)}]
  19. \draw[fill=green!30] (0,0) -- (-180:0.75cm) arc (180:120:0.75cm);
  20. \draw (150:0.5cm) node {$\beta$};
  21. \end{scope}
  22. % angle gamma
  23. \begin{scope}[shift={(60:4)}]
  24. \draw[fill=green!30] (0,0) -- (-120:.75cm) arc (-120:-60:.75cm);
  25. \draw (-90:0.5cm) node {$\gamma$};
  26. \end{scope}
  27. % the triangle
  28. \draw [line width=1.5pt] (A) -- (B) -- (C) -- cycle;
  29. \end{tikzpicture}
  30. \end{document}