3
\documentclass[convert = false, tikz, usenames, dvipsnames]{standalone}
\usetikzlibrary{backgrounds}
\tikzset{
  partial circle/.style args = {#1:#2:#3}{
    insert path = {+ (#1:#3) arc (#1:#2:#3)}
  }
}
\begin{document}
\begin{tikzpicture}[
  every label/.append style = {font = \small},
  dot/.style = {outer sep = 0pt, inner sep = 0pt,
    shape = circle, label = {#1}},
  dot/.default =,
  small dot/.style = {minimum size = .05cm, dot = {#1}},
  small dot/.default =,
  big dot/.style = {minimum size = .15cm, dot = {#1}},
  big dot/.default =
  ]
  \def\angle{60}
  \def\dom{5}
  \def\circradius{.3}

  \coordinate (O) at (0, 0);

  \draw (O) circle[radius = \circradius];
  \draw[-latex] (.4, 0) -- (1, 0);
  \draw[dashed] (-5, 0) -- (.2, 0);
  \draw[thick, gray] (O) [partial circle = -210:-150:4cm];

  \begin{pgfonlayer}{background}
    \begin{scope}
      \begin{pgfinterruptboundingbox}
        \clip (O) circle[radius = 4cm];

        \foreach \a/\circ/\col in
        {1/.3/orange, 1.05/.42/blue, 1.1/.52/green, 1.15/.62/red,
          1.2/.72/Goldenrod}{
          \pgfmathsetmacro{\b}{\a / tan(\angle)}
          \begin{scope}[rotate = {180 - \angle}, shift = {(0, -\a - \circ)}]
            \draw[\col] plot[domain = 0:\dom, samples = 100]
            ({\x}, {\a * sqrt(1 + (\x / \b)^2)})
            node[fill = \col, draw = \col, small dot = { }, pos = 0] {};
          \end{scope}
    }
      \end{pgfinterruptboundingbox}
    \end{scope}
  \end{pgfonlayer}
\end{tikzpicture}
\end{document}

I would like to put the small dot at the 0th position of the curve. However, I can't get the small dot to appear at any position. How can I add this nodal dot?

So the code in question is

\foreach \a/\circ/\col in
{1/.3/orange, 1.05/.42/blue, 1.1/.52/green, 1.15/.62/red,
  1.2/.72/Goldenrod}{
  \pgfmathsetmacro{\b}{\a / tan(\angle)}
  \begin{scope}[rotate = {180 - \angle}, shift = {(0, -\a - \circ)}]
    \draw[\col] plot[domain = 0:\dom, samples = 100]
    ({\x}, {\a * sqrt(1 + (\x / \b)^2)})
    node[fill = \col, draw = \col, small dot = { }, pos = 0] {};
  \end{scope}

So I increased the dot size to 1cm to see if they were appearing. They are being pushed way off screen. How could that register as pos = 0?

enter image description here

1 Answer 1

4
\documentclass[convert = false, tikz, usenames, dvipsnames]{standalone}
\usetikzlibrary{backgrounds}
\tikzset{
  partial circle/.style args = {#1:#2:#3}{
    insert path = {+ (#1:#3) arc (#1:#2:#3)}
  }
}
\begin{document}
\begin{tikzpicture}[
  every label/.append style = {font = \small},
  dot/.style = {outer sep = 0pt, inner sep = 0pt,
    shape = circle, label = {#1}},
  dot/.default =,
  small dot/.style = {minimum size = .05cm, dot = {#1}},
  small dot/.default =,
  big dot/.style = {minimum size = .15cm, dot = {#1}},
  big dot/.default =
  ]
  \def\angle{60}
  \def\dom{5}
  \def\circradius{.3}

  \coordinate (O) at (0, 0);

  \draw (O) circle[radius = \circradius];
  \draw[-latex] (.4, 0) -- (1, 0);
  \draw[dashed] (-5, 0) -- (.2, 0);
  \draw[thick, gray] (O) [partial circle = -210:-150:4cm];

  \begin{pgfonlayer}{background}
    \begin{scope}
      \begin{pgfinterruptboundingbox}
        \clip (O) circle[radius = 4cm];

        \foreach \a/\circ/\col in
        {1/.3/orange, 1.05/.42/blue, 1.1/.52/green, 1.15/.62/red,
          1.2/.72/Goldenrod}{
          \pgfmathsetmacro{\b}{\a / tan(\angle)}
          \begin{scope}[rotate = {180 - \angle}, shift = {(0, -\a - \circ)}]
            \draw[\col] plot[domain = 0:\dom, samples = 100]
            ({\x}, {\a * sqrt(1 + (\x / \b)^2)})
            node[fill = \col, draw = \col, small dot = {}] at (0, \a) {};
          \end{scope}
    }
      \end{pgfinterruptboundingbox}
    \end{scope}
  \end{pgfonlayer}
\end{tikzpicture}
\end{document}

enter image description here

2
  • Why wasn't the position syntax working in this case?
    – dustin
    Aug 1, 2013 at 2:39
  • @dustin I am not familiar with the inner workings of plot, but I guess the path is finished earlier, so pos=<value> has no effect here. Aug 1, 2013 at 2:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .