Sarmate.net Sarmate.net
Home Features Pricing Documentation Contact
Log in Sign up
Back to gallery
TikZ DE

Ein- und umbeschriebenes Polygon

Sarmate sarmate_examples 2026-05-03 0 18

Regelmäßiges Vieleck mit Inkreis und Umkreis. Visuelles Werkzeug für Geometrieunterricht und Berechnung von π. Aus der technischen TikZ-Galerie von Sarmate (Quellen: MartinThoma/LaTeX-examples unter MIT, TeXample.net unter LPPL) — siehe auch unsere 900+ Figuren auf /tikz-gallery.php.

Open in demo Sign in to like
\documentclass[12pt,border=5pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usetikzlibrary{calc,angles,quotes,positioning,decorations.markings,arrows.meta,patterns,intersections,shapes,trees}
\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}
This example is licensed under CC‑BY‑4.0. You may copy, modify, and redistribute it as long as you credit the author (Sarmate sarmate_examples).