使用 TikZ 在同心圆内绘图

使用 TikZ 在同心圆内绘图

我想在一组同心圆内绘制某些形状。我已经能够绘制同心圆。我当前的 MWE 是:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{decorations.text,calc,arrows.meta}
\usetikzlibrary{positioning}
% Color Define
\definecolor{magenta}{HTML}{FF00FF}
\definecolor{brass}{rgb}{0.71, 0.65, 0.26}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[line width=0.5mm]
\coordinate (O) at (0,0);
\draw[magenta] (O) circle (6.5);
\draw[magenta] (O) circle (4.8);
\draw[magenta] (O) circle (2.3);
\draw[brass,dashed]  (O) circle (1.1);
\draw[red] (O) circle (0.35);
\end{tikzpicture}
\end{figure}
\end{document}

这提供了[未按比例绘制]:

在此处输入图片描述

所需的输出如下,基本上是如何在圆圈内绘制这些形状并显示方面

在此处输入图片描述

提前感谢您的建议和见解。

答案1

在此处输入图片描述

一些评论 您想要获得的图形具有旋转对称性,要求基于 30、60、... 度的循环。此外,构建 12 个“三角形”的点位于上图中用红色绘制的看不见的圆上。您可以通过修改参数来设置此圆的半径\r-0。与垂直“三角形”相对应的点在标签的构造中尤为重要$30^\circ$

代码

\documentclass[11pt, border=.8cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc, math, arrows.meta}

\begin{document}
\tikzset{
  c arc/.style args={#1:#2:#3}{insert path={++(#1:#3) arc (#1:#2:#3)}},
}
\tikzmath{
  real \r-0, \r0, \r1, \R, \eps;
  \r-0 = 0.46;
  \r0 = 1.1;
  \r1 = 1.25;
  \R = 2.30;
  \eps = .01;
}
\begin{tikzpicture}[scale=2]
  \draw[thick] (0, 0) circle (\r-0);
  \draw[red!50, very thin] (0, 0) circle (\r0);
  \draw[gray] (0, 0) circle (\r1);
  \draw[thick] (0, 0) circle (\R);
  \draw[thick] (0, 0) circle (2.1*\R);
  \draw[thick] (0, 0) circle (3*\R);
  \foreach \a in {0, 30, ..., 330}{%
    \draw[thick] (\a: \r0) ++(\a -15: \r1 -\r0) -- ++(\a: \R -\r1);
    \draw[thick] (\a: \r0) ++(\a -15: \r1 -\r0) -- ++(\a -15: \R -\r1 +\eps);
    \draw[thick] (\a: \r0) ++(\a +15: \r1 -\r0) -- ++(\a: \R -\r1);
    \draw[thick] (\a: \r0) ++(\a +15: \r1 -\r0) -- ++(\a +15: \R -\r1 +\eps);
  }

  %% label 30 degrees
  \draw[gray] (90: \r0) ++(90 -15: \R -\r0 +.3) -- ++(90 -15: 2.5*\R);
  \draw[gray] (90: \r0) ++(90 +15: \R -\r0 +.3) -- ++(90 +15: 2.5*\R);
  \draw[very thin, arrows={Latex[length=5]-Latex[length=5]}]
  (90: \r0) [c arc={90 -15}: {90 +15}: {3*\R}]
  node[pos=.5, above] {$30^\circ$};
\end{tikzpicture}
\end{document}

相关内容