diff options
Diffstat (limited to 'info/mathtrip/src/triangle.tex')
-rw-r--r-- | info/mathtrip/src/triangle.tex | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/info/mathtrip/src/triangle.tex b/info/mathtrip/src/triangle.tex new file mode 100644 index 0000000000..f663a1263b --- /dev/null +++ b/info/mathtrip/src/triangle.tex @@ -0,0 +1,46 @@ +%This document can be run standalone if few comments +%are removed. This is useful to check and modify the drawing. +% +%\documentclass{article} +%\usepackage{calc} +%\usepackage{tikz} +%\usetikzlibrary{arrows,decorations.markings} +%\begin{document} + +%length of the base of triangle. +%\newlength{\trianglebase} +%and its height +%\newlength{\triangleheight} +%Length of the mark for the right angle +%\newlength{\ranglesizeB} +% +\setlength{\trianglebase}{2cm} +\setlength{\triangleheight}{1.5cm} +\setlength{\ranglesizeB}{0.15cm} + +\savebox\TriangleBox{% + \begin{tikzpicture} + %Coordinates of the triangle + \coordinate (A) at (0,0); + \coordinate (B) at (\trianglebase,0); + \coordinate (C) at (.167\trianglebase,\triangleheight); + \coordinate (HeightBase) at (.167\trianglebase,0); + % + %Triangle with origin in (0,0) and a height of \triangleheight + %arriving at point "HeightBase". + \draw [thick] (A) -- (C) node[midway,left] {$b$} + -- (B) node[midway,above] {$a$} + -- cycle node[midway,below] {$c$}; + %Draw the height + \draw (HeightBase) -- (C) node[midway,right]{$h$}; + + %Draw the right angle symbol + \draw (HeightBase) -- ++ (0, \ranglesizeB) -- ++ (\ranglesizeB, 0) -- ++(0,-\ranglesizeB) -- cycle; + + %Put a letter for the angle. + \draw (A) node[below,left]{$A$}; + \draw (B) node[below,right]{$B$}; + \draw (C) node[above]{$C$}; + \end{tikzpicture} +} +%\end{document} |