📚 The CoCalc Library - books, templates and other resources
cocalc-examples / martinthoma-latex-examples / documents / gallery / equilateral-triangle-heights.tex
132934 viewsLicense: OTHER
\documentclass[varwidth=true, border=2pt]{standalone}1\usepackage{tikz}2\usetikzlibrary{arrows,positioning, calc}3\tikzset{4%Define standard arrow tip5>=stealth',6% Define arrow style7pil/.style={->,thick}8}910\begin{document}11\begin{tikzpicture}12% draw the background13\draw [line width=1.5pt, fill=gray!2] (0,0) -- (60:4) -- (4,0) -- cycle;1415\coordinate[label=left:$A$] (A) at (0,0);16\coordinate[label=right:$B$] (B) at (4,0);17\coordinate[label=above:$C$] (C) at (2,3.464);1819\coordinate[label=below:$c$](c) at ($ (A)!.5!(B) $);20\coordinate[label=left:$b$](b) at ($ (A)!.5!(C) $);21\coordinate[label=right:$a$](a) at ($ (B)!.5!(C) $);2223% angle alpha24\draw[fill=green!30] (0,0) -- (0:0.75cm) arc (0:60:.75cm);25\draw (0.35cm,0.25cm) node {$\alpha$};2627% angle beta28\begin{scope}[shift={(4cm,0cm)}]29\draw[fill=green!30] (0,0) -- (-180:0.75cm) arc (180:120:0.75cm);30\draw[color=gray, dashed] (0,0) -- node[sloped, above=-0.1cm] {$\scriptstyle h_b$} (150:3.464cm);31\draw (150:0.5cm) node {$\beta$};32\end{scope}3334% angle gamma35\begin{scope}[shift={(60:4)}]36\draw[fill=green!30] (0,0) -- (-120:.75cm) arc (-120:-60:.75cm);37\draw[color=gray, dashed] (0,0) -- node[right=-0.1cm] {$\scriptstyle h_c$} (-90:3.464cm);38\draw (-90:0.5cm) node {$\gamma$};39\end{scope}4041% Sign for right angle of h_c42\begin{scope}[shift={(2,0)}]43\draw[fill=gray!30] (0,0) -- node[above=-0.15cm,near start] {$\cdot$} (0:0.18cm)44arc (0:90:.18cm);45\end{scope}4647% sign of right angle of h_a48\begin{scope}[shift={(30:3.464cm)}]49\draw[fill=gray!30] (0,0) -- node[near end,right=-0.28cm] {$\cdot$} (-60:0.18cm)50arc (-60:-150:.18cm);51\end{scope}5253% sign of right angle of h_b54\begin{scope}[shift={(60:2cm)}]55\draw[fill=gray!30] (0,0) -- node[right=-0.08cm, near start] {$\cdot$} (60:0.18cm)56arc (60:-30:.18cm);57\end{scope}5859% Height with label60\draw[color=gray, dashed] (0,0) -- node[sloped, above=-0.1cm] {$\scriptstyle h_a$} (30:3.464cm);6162% The triangle63\draw [line width=1.5pt] (0,0) -- (60:4) -- (4,0) -- cycle;64\end{tikzpicture}65\end{document}666768