# Elegant way to put marks that are not equidistant along path

I want to put circles along path, but they are not equidistant. The problem is that code is repetitive and ugly. Is there any other more elegant way to do that?

MWE:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\begin{document}

\begin{tikzpicture}
\draw[decoration={markings,%
mark=at position 0.1 with {\fill (0,0) circle (0.06);},%
mark=at position 0.35 with {\fill (0,0) circle (0.06);},%
mark=at position 0.5 with {\fill (0,0) circle (0.06);},%
mark=at position 0.7 with {\fill (0,0) circle (0.06);},%
mark=at position 0.85 with {\fill (0,0) circle (0.06);}},%
postaction={decorate}] (0,0) arc (-35:-30:15) arc (-30:35:2) arc (215:170:1.5) arc (170:165:15);
\end{tikzpicture}

\end{document}


• That is why it exists the option between positions x and y step z: see How to make a figure with moving arrows? – Claudio Fiandrino Mar 19 '15 at 8:41
• @ClaudioFiandrino I think between positions x and y step z produces equidistant decorations. – Ignasi Mar 19 '15 at 9:25
• @Ignasi: right.. my comment comes after having read the first sentence, where it seemed to me that the OP exactly wanted equidistant circles – Claudio Fiandrino Mar 19 '15 at 9:32

Use a /.list instead with a custom style that uses markings a few times. Otherwise you have to hack a macro that is not so fun.

\documentclass[tikz]{standalone}
\usetikzlibrary{decorations.markings}
\pgfkeys{
/pgf/decoration/irregular markings/.style = {
mark= at position#1with {\fill (0,0) circle (0.06);}
}
}

\begin{document}
\begin{tikzpicture}
\draw[decoration={markings,irregular markings/.list={0.1,0.35,0.5,0.7,0.85}},
postaction={decorate}
] (0,0) arc (-35:-30:15) arc (-30:35:2) arc (215:170:1.5) arc (170:165:15);
\end{tikzpicture}
\end{document}