2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00
LaTeX-examples/tikz/circle-inscribed-circumscribed-polygon/circle-inscribed-circumscribed-polygon.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

27 lines
706 B
TeX

\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{amsmath,amssymb}
\begin{document}
\begin{tikzpicture}
\newcommand{\R}{1.5} % radius of the circle
\newcommand{\n}{12} % edges of the polygon
% Center
\path ( 0,0) coordinate (M);
% Inner polygon
\foreach \nr in {1, ..., \n}{
\path (360/\n*\nr:\R) coordinate (i\nr);
\draw (M) -- (i\nr);
}
\draw (0:0.3*\R) arc (0:360/\n:0.3*\R);
\coordinate[label=right:$\alpha$] (Alpha) at ({2*360/(\n+2)}:0.1*\R);
\draw (i1) \foreach \i in {2,...,\n} {-- (i\i)} -- cycle;
% Circle
\draw[green] (0,0) circle (\R);
\end{tikzpicture}
\end{document}