2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-26 06:48:04 +02:00
LaTeX-examples/tikz/arc/arc.tex
Martin Thoma 7740f0147f Remove trailing spaces
The commands

find . -type f -name '*.md' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

and

find . -type f -name '*.tex' -exec sed --in-place 's/[[:space:]]\+$//' {} \+

were used to do so.
2015-10-14 14:25:34 +02:00

43 lines
1 KiB
TeX

\documentclass{article}
\usepackage[pdftex,active,tightpage]{preview}
\setlength\PreviewBorder{2mm}
\usepackage{tikz}
\usetikzlibrary{shapes, calc, decorations}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{preview}
\resizebox{250px}{250px}{
\begin{tikzpicture}[]
\newcommand\R{1.3cm}
\draw[fill=gray!2] (0,0) circle (\R);
% draw the background
\draw [line width=0.1pt, fill=gray!10]
(0,0) --
(170: \R) --
(45:\R) -- cycle;
\begin{scope}[color=green]
\draw[fill=green!15] (0,0) --
(170:{\R*0.3}) arc (170:45:{{(\R)*0.3}});
\end{scope}
% Kreisbogen
\begin{scope}[thick, color=red]
\draw[] (170:\R) arc (170:45:\R);
\end{scope}
% Winkel
\draw[] (0,0) -- (170:\R);
\draw[] (0,0) -- (45:\R);
\draw[thick, color=blue] (170:\R) -- (45:\R);
% draw alpha
\coordinate[label=$\alpha$] (Alpha) at (-{\R/20}, 0);
\coordinate[label=$r$] (Alpha) at ({\R/2}, {\R/5});
\end{tikzpicture}
}
\end{preview}
\end{document}