3

I've been looking at this question:
Creating gears in TikZ

What I would like to do is convert the gears into semicricles that are touching, so far i have this:

\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}

So basically the final image should be the inner circle with an arc like pattern going around it.

simitar
  • 97
  • Welcome to TeX.SX! The code should be compilable. Please add a minimal working example (MWE). – Bobyandbob Aug 10 '17 at 14:04
  • sorry, i made a mistake \begin{figure} is missing – simitar Aug 10 '17 at 14:05
  • 1
    no, missing is preamble of your document (with only relative packages, of course). – Zarko Aug 10 '17 at 14:06
  • I think it should be ok now – simitar Aug 10 '17 at 14:07
  • 1
    @simitar, do you try to copy provided code in your latex editor and then compile? try and you will see, that in it are .missing \documentclass{...}, packages, which are necessary to compile your code, \begin{document} and on the end \end{document}. such small, complete document is called mwe (minimal working example). – Zarko Aug 10 '17 at 14:14
  • tikz is not well suited for such kind of image. it is better to draw this image in one (commercial) program for mechanical construction, export then to pdf or similar format and then included it as image. – Zarko Aug 10 '17 at 14:51
  • @Zarko okay, how about the first part of the question? Should I use a commercial tool for that also? – simitar Aug 10 '17 at 14:58
  • @simitar, i just pointed, that drawing with tikz is no so simple as with commercial diagram. see my answer below. – Zarko Aug 10 '17 at 16:29
  • @Zarko, apologies, the first part of my question is now the only part of the question, i removed the jagged teeth diagram and have updated my code to hopefully demonstrate what I am trying to achieve. In the graph I am trying to get the curved edges to be exact semicircles and if thats possible then to eliminate the part of the circle beneath is so it looks like a wheel with semicircles – simitar Aug 10 '17 at 16:47

1 Answers1

0

just to show, how demanding is draw such image with tikz. maybe this can serve as starting point:

\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}

enter image description here

Zarko
  • 296,517