Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know one can use the intersection package to find the point of intersection but I don't understand how to do it yet.

I would like to label the increasing order of the intersections F^*_2, F^*_1, F^*_m. F^*_1 (but over set with a ~), and F^*_2 with the same over set.

Note: I am ignoring the lower and upper most intersections.

The code is:

\documentclass[tikz,convert=false]{standalone}
\usetikzlibrary{through,calc}
\makeatletter
\tikzset{circle through extra radius/.code={% unorthodox addon for the through library
                                            % needs to be used after 'circle through'!
                                            % this can be avoided by slightly changing the source
  \tikz@addoption{%
    \pgfmathsetlengthmacro\pgf@tempa{\pgfkeysvalueof{/pgf/minimum width}+2*(#1)}%
    \pgfset{/pgf/minimum width/.expanded=\pgf@tempa}%
  }%
}}
\tikzset{
  special style/.code={%
    \if#1\tikz@nonactiveexlmark
      \pgfkeysalso{@special style}%
    \else
      \pgfkeysalso{style/.expanded=#1}%
    \fi
  },
  @special style/.style={draw=none,fill=none}
}
\makeatother
\begin{document}
\begin{tikzpicture}[
  every label/.append style={font=\small},
  dot/.style={fill,outer sep=+0pt,inner sep=+0pt,minimum size=2pt,shape=circle,draw=none,label={#1}},
  dot/.default={}
]
\begin{scope}[rotate around ={-20.5560452:(1, -.75)}]
      \node[scale = .75, dot = {right: \(P_1\)}] (P1) at (3cm, 0) {};
      \node[scale = .75, dot = {\(P_2\)}] (P2) at (-1, 0) {};
      \node[scale = .75, dot = {below: \(F\)}] (F) at (1cm, -.75cm) {};
      \path[blue] (F) edge (P1) edge (P2) (P1) edge (P2);
      \path ($(P1)!.75!(P2)$) coordinate (half-center);
      \foreach \sStyle/\xFocus in {{draw, thick}/half}
        \foreach \cPoint in {1, 2}
          \foreach \sStyleR/\dDeltaRadius[count = \cRadius from 0] in
          {/.0cm, /.5cm, /1cm, /1.5cm}
          {
            \node[style/.expanded = \sStyle,
            special style/.expanded = {\sStyleR}] at (P\cPoint.center)
            ({\xFocus:\cPoint:\cRadius}) [circle through/.expanded =
            {(\xFocus-center)}, circle through extra radius = \dDeltaRadius] {};
            \global\let\cRadius\cRadius
         }

      \clip(-4, -5) rectangle (8, 5);
      \draw [samples = 50, domain = -0.99:0.99, xshift = 1cm, red,
      thick] plot ({(-1 - (\x)^2) / (1 - (\x)^2)},
      {1.73 * (-2) * (\x) / (1 - (\x)^2)});
    \end{scope}
  \end{tikzpicture}
  \end{document}

enter image description here

From my post Tikz: drawing concentric circles with specified origins and the arc that connects the intersections Qrrbrbirlbel found the intersections with

\foreach \cSolution in {1,2}
    \foreach \cRadius in {1,...,3}
    \coordinate (i-\cRadius-\cSolution) at (intersection cs: first node={F:1:\cRadius}, second node={F:2:\cRadius}, solution=\cSolution);

but I am not clear on how to adapt the solution for my problem.

Edit 1:

I don't know if there is a smooth way to automate the process, but I have the middle point defined as:

\node[scale = .75, dot = {right:\(\overset{\mbox{~}}{F}_m^*\)}] (Fm)
      at ($(P1)!.75!(P2)$) {};

How can I make the the dot bigger and the overset ~ wont appear. I have tried \~ and ~ but nothing works.

Edit 2:

Close up of the output from Qrr.. answer:

The \tilde isn't overset and the node placement isn't similar.

enter image description here

Edit 3:

I was able to adjust some of the nodes but for the nodes along the hyperbola, if I adjust them more, the top nodes will be out of place.

enter image description here

\begin{tikzpicture}[scale = .7,
    every label/.append style = {font = \small},
    dot/.style = {fill, outer sep = +0pt, inner sep = +0pt,
      shape = circle, draw = none, label = {#1}},
    dot/.default =,
    small dot/.style = {minimum size = 2pt, dot = {#1}},
    small dot/.default =,
    big dot/.style = {minimum size = 3pt, dot = {#1}},
    big dot/.default =
  ]
    \begin{scope}[rotate around ={-23.9625:(.75, -1)}]
      \begin{scope}
        \clip(-2, -4) rectangle (0, 4);
        \draw [samples = 50, domain = -0.99:0.99, xshift = 1cm, red, thick]
        plot ({(-1 - (\x)^2) / (1 - (\x)^2)},
        {1.73 * (-2) * (\x) / (1 - (\x)^2)});
      \end{scope}
      \node[scale = .75, small dot = {right: \(P_1\)}] (P1) at (3, 0) {};
      \node[scale = .75, small dot = {below, left = 3.5pt: \(P_2\)}] (P2) at
      (-1, 0) {};
      \node[scale = .75, small dot = {below, left = 3.5pt: \(F\)}] (F)
      at (.75, -1) {};
      \path[blue] (F) edge (P1) edge (P2) (P1) edge (P2);
      \path ($(P1)!.75!(P2)$) coordinate (Fm) node[big dot =
      {below = 10pt, right = 3pt: \(F_m^*\)}] {};
      \foreach \cPoint in {1, 2}
        \foreach \sStyleR/\dDeltaRadius[count = \cRadius from 0] in
        {.0cm, .5cm, 1cm}
          \node[draw, thick] at (P\cPoint.center) (\cPoint: \cRadius)
          [circle through = (Fm), circle through extra radius = \dDeltaRadius]
          {};
      \foreach \cSolution in {1, 2}
        \foreach \cRadius in {1, 2}
          \node[black, big dot = {right = 2pt, below = 2pt:
            $\ifnum\cSolution = 2\expandafter\tilde\fi F^*_\cRadius$}]
          (n-\cRadius-\cSolution) at
          (intersection cs: first node = {1: \cRadius},
                            second node = {2: \cRadius},
                            solution = \cSolution) {};
    \end{scope}
  \end{tikzpicture}
share|improve this question
    
I’m not so sure about the node placement issues you have. Of course, if you change the placement in the loops, all dots will be placed differently, you are going to either place the \nodes outside of the loop or enhance the \foreach loops so that they use more than one variable. Should I update my answer giving you some ideas? –  Qrrbrbirlbel Jun 12 '13 at 1:30
    
@Qrrbrbirlbel what do you mean by update your answer? –  dustin Jun 12 '13 at 1:31

1 Answer 1

up vote 4 down vote accepted

You can use the same \foreach loop for the labeling:

\foreach \cSolution in {1,2}
  \foreach \cRadius in {1,...,2}
    \node[green,dot={right:$\ifnum\cSolution=2\expandafter\tilde\fi F^*_\cRadius$}]
         (n-\cRadius-\cSolution)
      at (intersection cs: first node={1:\cRadius},
                          second node={2:\cRadius},
                            solution=\cSolution) {};

The math behind the intersection cs seems to be a little bit un-precise, so I repeated the task with the intersections library.

(I also have cleaned up a little bit.)

Code (intersection cs)

\documentclass[tikz,convert=false]{standalone}
\usetikzlibrary{through,calc}
\makeatletter
\tikzset{circle through extra radius/.code={% unorthodox addon for the through library
                                            % needs to be used after 'circle through'!
                                            % this can be avoided by slightly changing the source
  \tikz@addoption{%
    \pgfmathsetlengthmacro\pgf@tempa{\pgfkeysvalueof{/pgf/minimum width}+2*(#1)}%
    \pgfset{/pgf/minimum width/.expanded=\pgf@tempa}%
  }%
}}
\makeatother
\begin{document}
\begin{tikzpicture}[
  every label/.append style={font=\small},
  dot/.style={fill,outer sep=+0pt,inner sep=+0pt,shape=circle,draw=none,label={#1}},
  dot/.default=,
  small dot/.style={minimum size=2pt,dot={#1}},
  small dot/.default=,
  big dot/.style={minimum size=3pt,dot={#1}},
  big dot/.default=
]
\begin{scope}[rotate around ={-20.5560452:(1, -.75)}]
      \node[small dot = {right: \(P_1\)}] (P1) at (3cm, 0) {};
      \node[small dot = {\(P_2\)}]        (P2) at (-1, 0) {};
      \node[small dot = {below: \(F\)}]   (F)  at (1cm, -.75cm) {};
      \path[blue] (F) edge (P1) edge (P2) (P1) edge (P2);
      \path ($(P1)!.75!(P2)$) coordinate (Fm) node[dot={right:$F_m^*$}] {};
      \foreach \cPoint in {1, 2}
        \foreach \sStyleR/\dDeltaRadius[count = \cRadius from 0] in {.0cm, .5cm, 1cm, 1.5cm}
            \node[draw] at (P\cPoint.center) (\cPoint:\cRadius) [circle through=(Fm), circle through extra radius = \dDeltaRadius] {};
      \foreach \cSolution in {1,2}
        \foreach \cRadius in {1,2}
          \node[green,big dot={right:$\ifnum\cSolution=2\expandafter\tilde\fi F^*_\cRadius$}]
            (n-\cRadius-\cSolution) at (intersection cs: first node={1:\cRadius},
                                                        second node={2:\cRadius},
                                                           solution=\cSolution) {};

      \clip(-4, -5) rectangle (8, 5);
      \draw [samples = 50, domain = -0.99:0.99, xshift = 1cm, red,
      thick] plot ({(-1 - (\x)^2) / (1 - (\x)^2)},
      {1.73 * (-2) * (\x) / (1 - (\x)^2)});
\end{scope}
\end{tikzpicture}
\end{document}

Output (intersection cs)

enter image description here

Code (intersections library)

\documentclass[tikz,convert=false]{standalone}
\usetikzlibrary{through,calc,intersections}
\makeatletter
\tikzset{circle through extra radius/.code={% unorthodox addon for the through library
                                            % needs to be used after 'circle through'!
                                            % this can be avoided by slightly changing the source
  \tikz@addoption{%
    \pgfmathsetlengthmacro\pgf@tempa{\pgfkeysvalueof{/pgf/minimum width}+2*(#1)}%
    \pgfset{/pgf/minimum width/.expanded=\pgf@tempa}%
  }%
}}
\makeatother
\begin{document}
\begin{tikzpicture}[
  every label/.append style={font=\small},
  dot/.style={fill,outer sep=+0pt,inner sep=+0pt,shape=circle,draw=none,label={#1}},
  dot/.default=,
  small dot/.style={minimum size=2pt,dot={#1}},
  small dot/.default=,
  big dot/.style={minimum size=3pt,dot={#1}},
  big dot/.default=
]
\begin{scope}[rotate around ={-20.5560452:(1, -.75)}]
      \node[small dot = {right: \(P_1\)}] (P1) at (3cm, 0) {};
      \node[small dot = {\(P_2\)}]        (P2) at (-1, 0) {};
      \node[small dot = {below: \(F\)}]   (F)  at (1cm, -.75cm) {};
      \path[blue] (F) edge (P1) edge (P2) (P1) edge (P2);
      \path ($(P1)!.75!(P2)$) coordinate (Fm) node[dot={right:$F_m^*$}] {};
      \foreach \cPoint in {1, 2}
        \foreach \dDeltaRadius[count = \cRadius from 0] in {.0cm, .5cm, 1cm, 1.5cm}
            \node[draw, name path global/.expanded=\cPoint:\cRadius] at (P\cPoint.center) (\cPoint:\cRadius) [circle through=(Fm), circle through extra radius = \dDeltaRadius] {};
      \foreach \cRadius in {1,2} {
        \tikzset{name intersections={of/.expanded={1:\cRadius} and 2:\cRadius,name/.expanded=n'-\cRadius}}
        \foreach \cSolution in {1,2}
          \node[green,big dot={right:$\ifnum\cSolution=2\expandafter\tilde\fi F^*_\cRadius$}] (n-\cRadius-\cSolution) at (n'-\cRadius-\cSolution){};
      }

      \clip (-4, -5) rectangle (8, 5);
      \draw [samples = 50, domain = -0.99:0.99, xshift = 1cm, red,
      thick] plot ({(-1 - (\x)^2) / (1 - (\x)^2)},
      {1.73 * (-2) * (\x) / (1 - (\x)^2)});
\end{scope}
\end{tikzpicture}
\end{document}

Output (intersections library)

enter image description here

share|improve this answer
    
Is there a way to make the dots a bit bigger? –  dustin Jun 11 '13 at 17:42
    
@dustin Sure there is, I just have included scale=.75 in the dot style. You can either use another scale factor or a different minimum size. –  Qrrbrbirlbel Jun 11 '13 at 17:46
    
Also, my tilda appear offset to the left and not above. Is there a package or something missing? Last question, I tried using fill = white so the labels weren't overtaken by the lines but all that did was change the dot to white. How can I clear that up as well? –  dustin Jun 11 '13 at 17:54
    
I copied over that line from the post so I have $\ifnum\cSolution = 2\expandafter\tilde\fi F^*_\cRadius$ but the tilde is still on the left and not above. I just tried the fill = white. It doesn't look as clean though. Can LaTeX place the nodes near the dots in open white space automatically or would that need to be done individual? –  dustin Jun 11 '13 at 18:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.