2

I want to know how can I write some text around a circular disk? My circular disk is something like:

\documentclass[border=5pt]{standalone}
\usepackage{tikz} 
\usetikzlibrary{calc} 
\begin{document} 
\begin{tikzpicture} 
\def\NumSpokes{8} 
\def\InnerR{2.9} 
\def\OuterR{3} 
\draw (0,0) circle (\OuterR); \foreach \k in {1,...,\NumSpokes}
{% 
\draw (\k*360/\NumSpokes:\InnerR) -- (\k*360/\NumSpokes:\OuterR+0.1)         ; } 
\foreach \k in {3,6,7}{%
\fill[black] (\k*360/\NumSpokes:\OuterR) circle (0.1);
}
\end{tikzpicture} 
\end{document}
\end{document}

I want to know if it is possible to show the distance between the first and the second black circles, with for example "L1", and the distance between the second and the third black circles, with "L2" by a simple "{"s with "L1" and "L2" on them around and out of the main disk?

sara kaviani
  • 93
  • 1
  • 6
  • 1
    Please see my edit in your previous question to see if it is ok. I mean Do you mean a horizontal distance? You could show the output of the above code edited in a picture. You can add pictures using the button with the photo – koleygr Sep 09 '18 at 11:06
  • Just for future reference: When we have two points and we are talking about showing the distance between them we are always talking about a straight line. The "bended distance" around a part of a circle is called an "angular sector". – koleygr Sep 09 '18 at 11:30

1 Answers1

5

Using the answer of @Qrrbrbirlbel from here: https://tex.stackexchange.com/a/82930/120578 I got this:

\documentclass[border=5pt]{standalone}
\usepackage{tikz} 
\usetikzlibrary{calc} 
\usetikzlibrary{decorations.pathreplacing}

\makeatletter 

\usetikzlibrary{arrows}
\newcommand*{\braceme}[6][]{% #1 = optional
                            % #2 = radius
                            % #3 = start angle
                            % #4 = end angle
                            % #5 = node name
                            % #6 = node content
\draw[
    shift={(#3:#2)},
    right to reversed-right to reversed,
    shorten >=-.75\pgflinewidth,
    #1
    ] (0,0)
        arc[radius=#2, start angle=#3, end angle=#3+(#4-#3)/2] node[rotate=#3+(#4-#3)/2-90,above=2pt] (#5) {#6};
\draw[
    shift={({#3+(#4-#3)/2}:#2)},
    left to reversed-left to reversed,
    shorten <=-.75\pgflinewidth,
    #1
    ] (0,0)
        arc[radius=#2, start angle=#3+(#4-#3)/2, end angle=#4];
}


\begin{document} 
\begin{tikzpicture} 
\def\NumSpokes{8} 
\def\InnerR{2.9} 
\def\OuterR{3} 
\draw (0,0) circle (\OuterR); \foreach \k in {1,...,\NumSpokes}
{% 
\draw (\k*360/\NumSpokes:\InnerR) -- (\k*360/\NumSpokes:\OuterR+0.1) ; } 
\foreach \k in {3,6,7}{%
\fill[black] (\k*360/\NumSpokes:\OuterR) circle (0.1) ;
\coordinate (Cir\k) at (\k*360/\NumSpokes:\OuterR) ;
}

\draw[dashed] (3*360/\NumSpokes:3)--(3*360/\NumSpokes:3.5);
\draw[dashed] (6*360/\NumSpokes:3)--(6*360/\NumSpokes:3.5);
\draw[dashed] (7*360/\NumSpokes:3)--(7*360/\NumSpokes:3.5);

\braceme[thick,red]{3.5}{6*360/\NumSpokes}{7*360/\NumSpokes}{br2}{$L_1$}
\braceme[thick,blue]{3.5}{3*360/\NumSpokes}{6*360/\NumSpokes}{br2}{$L_1$}

\end{tikzpicture} 
\end{document}

enter image description here

Is this ok for you?

koleygr
  • 20,105