关于在 tikz 上画一个圆圈周围的半圆的问题

关于在 tikz 上画一个圆圈周围的半圆的问题

我一直在看这个问题:
在 TikZ 中创建齿轮

我想要做的是将齿轮转换成接触的半圆形,到目前为止我已经得到了:

\documentclass{article}

\usepackage{tikz}

\begin{document}
\begin{figure}[h]
\centering
\begin{tikzpicture}
\draw[thick, fill = gray] (0,0) circle (0.2cm);
\draw[thick] (0,0) circle (3cm);
\draw[->, rotate around={45:(0,0)}] (0,0) -- (3,0)  node [near end,fill=white] {$r_0$};
\draw[->, rotate around={-45:(0,0)}] (0,0) -- (1.2,0)  node [midway,fill=white] {$r_i$};
\draw[-latex] (0,-1.9) arc (274:180:1.5cm) node[near start,left] {$\Omega$};
\draw[thick] (0,0) circle (1.2cm);
\draw[thick] (4,2) circle (0.3cm);
\draw[thick] (4,1) circle (0.28cm);
\draw[thick] (4,0) circle (0.26cm);

\draw[thick]
\foreach \i in {1,2,...,14} {%
[rotate=(\i-1)*36] 
(0:1.2)  arc (0:18:1.2) {[rounded corners=8pt] -- ++(18: 0.3)  arc (18:36:1.65) } -- ++(36: -0.3) };
\end{tikzpicture}
\end{figure}


\end{document}

所以基本上最终的图像应该是内圆,周围有弧形图案。

答案1

只是为了展示一下,用 绘制这样的图像有多么困难tikz。也许这可以作为起点:

\documentclass[tikz, margin=3mm]{standalone}

\begin{document}
\begin{tikzpicture}
\draw[thick, fill = gray] (0,0) circle (0.2cm);
\draw[thick] (0,0) circle (3cm);
 \draw[->, rotate around={45:(0,0)}] (0,0) -- (3,0)  node [ midway,fill=white] {$r_0$};
\draw[->, rotate around={-45:(0,0)}] (0,0) -- (1.2,0)  node [midway,fill=white] {$r_i$};
\draw[-latex] (0,-1.4) arc (270:180:1.5cm) node[near start,left] {$\Omega$};
% test
\draw[red,dashed] (0,0) -- (7,0);
\draw[red,thick] (3,-0.50) arc (180:0:5mm);
\draw[red,thick] (4,-0.50) arc (180:0:5mm);
\draw[red,thick] (5,-0.50) arc (180:0:5mm)
                           coordinate (a1);
\draw[red,thick, rounded corners=1mm] 
    (a1) -| (6.1,5mm) .. controls + (-1,0) and +(2,-2) .. (45:30mm);
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容