Files
mathematikfhtw/tikzgrafiken/Loesung001.tex
2020-10-24 13:47:37 +02:00

44 lines
1.5 KiB
TeX

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usetikzlibrary{snakes}
\usetikzlibrary{positioning}
\usepackage{verbatim}
\begin{document}
\begin{tikzpicture}[scale=1, on grid]
%\draw [help lines](-4,-2) grid (12,7);
\draw[-triangle 45] (-3.5,0) -- (11,0) node[right] {$x$};
\foreach \x in {-3,-2,-1, 1,2,3,4,5,6,7,8,9,10}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
\draw[-triangle 45] (0,-1) -- (0,6) node[above] {$y$};
\foreach \y in {-1,1,2,3,4,5}
\draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$};
\draw[-triangle 45, color=violet] (0,0) -- (3,4) node[midway,sloped,above] {$\vec a$};
\draw [color=violet, dashed, thin] (3,-0.4) node[below, sloped] {$a_1$} -- (3,4);
\draw [color=violet, dashed, thin] (-0.4,4) node[above, left] {$a_2$} -- (3,4);
\draw[-triangle 45, color=red] (0,0) -- (10,5) node[midway,sloped,above] {$\vec b$};
\draw [color=red, dashed, thin] (10,-0.4) node[below, sloped] {$b_1$} -- (10,5);
\draw [color=red, dashed, thin] (-0.4,5) node[above, left] {$b_2$} -- (10,5);
\draw[-triangle 45, color=blue] (0,0) -- (10/2,5/2) node[midway,sloped,above] {$\frac{1}{2}\vec b$};
\draw [color=blue, dashed, thin] (10/2,-0.4) node[below, sloped] {$\frac{1}{2} b_1$} -- (10/2,5/2);
\draw [color=blue, dashed, thin] (-0.4,5/2) node[above, left] {$\frac{1}{2} b_2$} -- (10/2,5/2);
\draw [-triangle 45,color=magenta, dashed, thin] (10/2,5/2) -- (3,4);
\end{tikzpicture}
\end{document}