Added «tikz» package
This commit is contained in:
parent
401ba36179
commit
ae0ce4c072
BIN
tikz/build/tikz-squares.pdf
Normal file
BIN
tikz/build/tikz-squares.pdf
Normal file
Binary file not shown.
57
tikz/tikz-squares.tex
Normal file
57
tikz/tikz-squares.tex
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
\documentclass[a4]{article}
|
||||||
|
\usepackage{tikz}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
Draw a box and label the corners and the center:
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\draw (0,0) -- (0,1) -- (1,1) -- (1,0) -- (0,0);
|
||||||
|
\node [below left] at (0,0) {$a$};
|
||||||
|
\node [above left] at (0,1) {$b$};
|
||||||
|
\node [above right] at (1,1) {$c$};
|
||||||
|
\node [below right] at (1,0) {$d$};
|
||||||
|
\draw [fill] (0.5,0.5) circle [radius=0.5pt];
|
||||||
|
\node [above right] at (0.45,0.45) {\small {$e$}};
|
||||||
|
\end{tikzpicture}
|
||||||
|
|
||||||
|
\bigskip \hrule \bigskip
|
||||||
|
|
||||||
|
Draw some lines:
|
||||||
|
|
||||||
|
\bigskip
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\draw [|-] (0,0) -- (2,0);
|
||||||
|
\draw [|-<] (0,0.5) -- (2,0.5);
|
||||||
|
\draw [|->] (0,1) -- (2,1);
|
||||||
|
\end{tikzpicture}
|
||||||
|
|
||||||
|
\bigskip \hrule \bigskip
|
||||||
|
|
||||||
|
\paragraph{An experiment with polar coordinates}
|
||||||
|
|
||||||
|
This does not work:
|
||||||
|
|
||||||
|
\vspace{1.5cm}
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\tikz \draw [->] (0,0) -- (0:1);
|
||||||
|
\tikz \draw [->] (0,0) -- (72:1);
|
||||||
|
\tikz \draw [->] (0,0) -- (144:1);
|
||||||
|
\tikz \draw [->] (0,0) -- (216:1);
|
||||||
|
\tikz \draw [->] (0,0) -- (288:1);
|
||||||
|
\end{tikzpicture}
|
||||||
|
|
||||||
|
\bigskip
|
||||||
|
|
||||||
|
But this does:
|
||||||
|
|
||||||
|
\bigskip
|
||||||
|
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\foreach \a in {0, 72,...,288}
|
||||||
|
\draw [->] (0,0) -- (\a:1);
|
||||||
|
\end{tikzpicture}
|
||||||
|
|
||||||
|
\end{document}
|
Loading…
Reference in New Issue
Block a user