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.

How can I place more nodes in an already cramped figure? Here is intended outcome:

enter image description here

Here is my current figure:

enter image description here

I am looking to add the velocity vector notation and the time notations (t_f < t_m) both greater and less than.

How can I add the remaining nodes in an already crowded figure?

If you need to see the code, I can post it as well.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections, calc, arrows, decorations.markings, backgrounds}
\tikzset{
  invclip/.style={
    clip,
    insert path={
        (-520pt, -520pt) rectangle (520pt, 520pt)
      }
    }
  }
  \begin{document}
  \begin{tikzpicture}[scale = 1.75,
    every label/.append style = {font = \small},
    dot/.style = {outer sep = +0pt, inner sep = +0pt,
      shape = circle, draw = black, label = {#1}},
    dot/.default =,
    small dot/.style = {minimum size = 2.5pt, dot = {#1}},
    small dot/.default =,
    big dot/.style = {minimum size = 5pt, dot = {#1}},
    big dot/.default =,
    line join = round, line cap = round, >=triangle 45
    ]
      \pgfmathsetmacro{\e}{0.2768}
  \pgfmathsetmacro{\etilde}{0.6789}
  \pgfmathsetmacro{\a}{1.36}
  \pgfmathsetmacro{\b}{\a * sqrt(1 - \e^2)} 
  \pgfmathsetmacro{\btilde}{\a * sqrt(1 - (\etilde)^2)}
  \pgfmathsetmacro{\c}{sqrt(\a^2 - \b^2)}
  \pgfmathsetmacro{\ctilde}{sqrt(\a^2 - (\btilde)^2)}
  \pgfmathsetmacro{\angle}{88.23}

  \draw[dashed, rotate = \angle] (-\a + \ctilde, 0) -- (\a + \ctilde, 0);
  \draw[dashed] (-\a - \c, 0) -- (\a - \c, 0);

  \node[font = \scriptsize, fill = orange, big dot = {below: \(F\)}] (F)
  at (0, 0) {};
  \node[font = \scriptsize, fill = white, big dot = {below: \(F^*\)}] (FS)
  at (-2 * \c cm, 0) {};

  \path[name path global = ecc2768] (-\c, 0) ellipse[x radius = \a cm,
  y radius = \b cm];

  \draw[red, name path = r2] (0, 0) circle[radius = 1.523679cm];
  \draw[blue, name path = r1] (0, 0) circle[radius = 1cm];
  \draw[name intersections = {of = ecc2768 and r1}] (F) -- (intersection-1)
  node[fill, big dot = {right: \(P_1\)}] (P1) {};
  \draw[name intersections = {of = ecc2768 and r2}] (F) -- (intersection-1)
  node[fill, big dot = {above left: \(P_2\)}] (P2) {};
  \draw[draw = none] (P1) -- (F) node[font = \scriptsize, pos = .5,
  fill = white, inner sep = 0cm] {\(r_1\)};
  \draw[draw = none] (P2) -- (F) node[font = \scriptsize, pos = .5,
  fill = white, inner sep = 0cm] {\(r_2\)};
  \draw (P1) -- (P2) node[font = \scriptsize, fill = white, inner sep = 0cm,
  pos = .5] {\(c\)};

  \begin{pgfinterruptboundingbox}
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0.7 with {\arrow{latex reversed}}
        }]
        \path[invclip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw[name path global = ecc2768, postaction = decorate] (-\c, 0)
        ellipse [x radius = \a cm, y radius = \b cm];
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}

  \draw let
    \p0 = (F),
    \p1 = (P1),
    \p2 = (P2),
    \n1 = {atan2(\x1 - \x0, \y1 - \y0)},
    \n2 = {atan2(\x2 - \x0, \y2 - \y0)},
    \n3 = {.35cm},
    \n4 = {(\n1 + \n2) / 2}
  in (F) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]
  node[font = \scriptsize, fill = white, inner sep = 0cm] at
  ([shift = (F)] \n4:.5cm) {\pgfmathparse{\n2 - \n1}%
    $\pgfmathprintnumber{\pgfmathresult}^{\circ}$
  };

  \path[name path = aux1] (P1) circle[radius = 1bp];

  \draw[name intersections = {of = ecc2768 and aux1}, latex-]
  ($(intersection-2)!.75cm!(intersection-1)$) -- (P1);

  \path[name path = aux2] (P2) circle[radius = 1bp];

  \draw[name intersections = {of = ecc2768 and aux2}, -latex]
  (P2) -- ($(intersection-1)!.75cm!(intersection-2)$);

  \begin{pgfinterruptboundingbox}
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0.5 with {\arrow{latex reversed}}
        }]
        \path[name path global = ecc6789unrotated] (\ctilde, 0) ellipse    
        (\a cm and \btilde cm);
        \path[invclip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw [name intersections = {of = r1 and ecc6789unrotated},
        postaction = decorate] (intersection-2) let
          \p0 = (F),
          \p1 = (P1),
          \p2 = (intersection-2),
          \n1 = {atan2(\x1 - \x0, \y1 - \y0)},
          \n2 = {atan2(\x2 - \x0, \y2 - \y0)},
          \n3 = {\n1 - \n2}
        in \pgfextra{\xdef\myangle{\n3}} [rotate = \n3,
        name path global = ecc6789rotated] (\ctilde, 0) ellipse
        [x radius = \a cm, y radius = \btilde cm];
        % \node at (0,3) {The angle of rotation is: \pgfmathparse{\myangle}
        % $\pgfmathprintnumber{\pgfmathresult}^\circ$};
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}

  \begin{scope}[rotate around = {\myangle: (0, 0)}]
    \node[font = \scriptsize, fill = white, big dot = {left: \(\tilde{F}^*\)}]
    (FST) at (2 * \ctilde cm, 0) {};
  \end{scope}

  \draw[name intersections = {of = ecc6789rotated and aux1}, -latex] (P1) --
  ($(intersection-2)!.75cm!(intersection-1)$);
  \draw[name intersections = {of = ecc6789rotated and aux2}, -latex] (P2) --
  ($(intersection-1)!.75cm!(intersection-2)$);

  \begin{pgfinterruptboundingbox}
    % To prevent the clipping path from making our picture larger
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0.2 with {\arrow{latex}},
        }]
        \path[clip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw [orange, postaction = decorate] (-\c, 0) ellipse
        [x radius = \a cm, y radius = \b cm];
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}

  \begin{pgfinterruptboundingbox}
    % To prevent the clipping path from making our picture larger
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0 with {\arrow{latex}},
        }]
        \path[clip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw [name intersections = {of = r1 and ecc6789unrotated},
        postaction = decorate, PineGreen] (intersection-2) 
        let
          \p0 = (F),
          \p1 = (P1),
          \p2 = (intersection-2),
          \n1 = {atan2(\x1 - \x0, \y1 - \y0)},
          \n2 = {atan2(\x2 - \x0, \y2 - \y0)},
          \n3 = {\n1 - \n2}
        in \pgfextra{\xdef\myangle{\n3}} [rotate = \n3,
        name path global = ecc6789rotated] (\ctilde, 0) ellipse
        [x radius = \a cm, y radius = \btilde cm];
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}
  \end{tikzpicture}
\end{document}
share|improve this question
1  
I think it would be good to have the code. –  Gonzalo Medina Jun 19 '13 at 0:04
    
@GonzaloMedina added –  dustin Jun 19 '13 at 0:45
    
@StevenB.Segletes updated. –  dustin Sep 1 '13 at 2:34
    
Is this still an active question? What have you tried already? If you want to mark certain points inside a cramped figure you could position the text outside of all circles/ellipses and draw a fine line from there to the point while potentially over-drawing un-important parts of the circles. –  Qrrbrbirlbel Sep 1 '13 at 2:44
    
I was going to update my answer to reflect some more modern syntax from the stackengine package (\stackinset rather than \bottominset) and realized that your MWE and my answer now produce a vertically inverted tikz image. I'm guessing you were the victim of a tikz package upgrade, but do you know what parameter to tweak so as to recreate your original figure? –  Steven B. Segletes Apr 23 at 22:46

1 Answer 1

up vote 4 down vote accepted

Maybe not what you are looking for, but I used stackengine's \stackinset macro to overlay what you had done with the remaining labels. All the "action" is at the bottom of my MWE, and falls outside of the tikz environment.

UPDATED to reflect more modern syntax of stackengine package, using \stackinset rather than the deprecated \bottominset macro. (Also, the tikz atan2 macro changed syntax)

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{intersections, calc, arrows, decorations.markings, backgrounds}
\tikzset{
  invclip/.style={
    clip,
    insert path={
        (-520pt, -520pt) rectangle (520pt, 520pt)
      }
    }
  }
\usepackage{stackengine}
  \begin{document}
\newsavebox{\mypic}
\sbox{\mypic}{%
  \begin{tikzpicture}[scale = 1.75,
    every label/.append style = {font = \small},
    dot/.style = {outer sep = +0pt, inner sep = +0pt,
      shape = circle, draw = black, label = {#1}},
    dot/.default =,
    small dot/.style = {minimum size = 2.5pt, dot = {#1}},
    small dot/.default =,
    big dot/.style = {minimum size = 5pt, dot = {#1}},
    big dot/.default =,
    line join = round, line cap = round, >=triangle 45
    ]
      \pgfmathsetmacro{\e}{0.2768}
  \pgfmathsetmacro{\etilde}{0.6789}
  \pgfmathsetmacro{\a}{1.36}
  \pgfmathsetmacro{\b}{\a * sqrt(1 - \e^2)} 
  \pgfmathsetmacro{\btilde}{\a * sqrt(1 - (\etilde)^2)}
  \pgfmathsetmacro{\c}{sqrt(\a^2 - \b^2)}
  \pgfmathsetmacro{\ctilde}{sqrt(\a^2 - (\btilde)^2)}
  \pgfmathsetmacro{\angle}{88.23}

  \draw[dashed, rotate = \angle] (-\a + \ctilde, 0) -- (\a + \ctilde, 0);
  \draw[dashed] (-\a - \c, 0) -- (\a - \c, 0);

  \node[font = \scriptsize, fill = orange, big dot = {below: \(F\)}] (F)
  at (0, 0) {};
  \node[font = \scriptsize, fill = white, big dot = {below: \(F^*\)}] (FS)
  at (-2 * \c cm, 0) {};

  \path[name path global = ecc2768] (-\c, 0) ellipse[x radius = \a cm,
  y radius = \b cm];

  \draw[red, name path = r2] (0, 0) circle[radius = 1.523679cm];
  \draw[blue, name path = r1] (0, 0) circle[radius = 1cm];
  \draw[name intersections = {of = ecc2768 and r1}] (F) -- (intersection-1)
  node[fill, big dot = {right: \(P_1\)}] (P1) {};
  \draw[name intersections = {of = ecc2768 and r2}] (F) -- (intersection-1)
  node[fill, big dot = {above left: \(P_2\)}] (P2) {};
  \draw[draw = none] (P1) -- (F) node[font = \scriptsize, pos = .5,
  fill = white, inner sep = 0cm] {\(r_1\)};
  \draw[draw = none] (P2) -- (F) node[font = \scriptsize, pos = .5,
  fill = white, inner sep = 0cm] {\(r_2\)};
  \draw (P1) -- (P2) node[font = \scriptsize, fill = white, inner sep = 0cm,
  pos = .5] {\(c\)};

  \begin{pgfinterruptboundingbox}
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0.7 with {\arrow{latex reversed}}
        }]
        \path[invclip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw[name path global = ecc2768, postaction = decorate] (-\c, 0)
        ellipse [x radius = \a cm, y radius = \b cm];
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}

  \draw let
    \p0 = (F),
    \p1 = (P1),
    \p2 = (P2),
    \n1 = {atan2(\y1 - \y0, \x1 - \x0)},
    \n2 = {atan2(\y2 - \y0, \x2 - \x0)},
    \n3 = {.35cm},
    \n4 = {(\n1 + \n2) / 2}
  in (F) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]
  node[font = \scriptsize, fill = white, inner sep = 0cm] at
  ([shift = (F)] \n4:.5cm) {\pgfmathparse{\n2 - \n1}%
    $\pgfmathprintnumber{\pgfmathresult}^{\circ}$
  };

  \path[name path = aux1] (P1) circle[radius = 1bp];

  \draw[name intersections = {of = ecc2768 and aux1}, latex-]
  ($(intersection-2)!.75cm!(intersection-1)$) -- (P1);

  \path[name path = aux2] (P2) circle[radius = 1bp];

  \draw[name intersections = {of = ecc2768 and aux2}, -latex]
  (P2) -- ($(intersection-1)!.75cm!(intersection-2)$);

  \begin{pgfinterruptboundingbox}
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0.5 with {\arrow{latex reversed}}
        }]
        \path[name path global = ecc6789unrotated] (\ctilde, 0) ellipse    
        (\a cm and \btilde cm);
        \path[invclip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw [name intersections = {of = r1 and ecc6789unrotated},
        postaction = decorate] (intersection-2) let
          \p0 = (F),
          \p1 = (P1),
          \p2 = (intersection-2),
          \n1 = {atan2(\y1 - \y0, \x1 - \x0)},
          \n2 = {atan2(\y2 - \y0, \x2 - \x0)},
          \n3 = {\n1 - \n2}
        in \pgfextra{\xdef\myangle{\n3}} [rotate = \n3,
        name path global = ecc6789rotated] (\ctilde, 0) ellipse
        [x radius = \a cm, y radius = \btilde cm];
        % \node at (0,3) {The angle of rotation is: \pgfmathparse{\myangle}
        % $\pgfmathprintnumber{\pgfmathresult}^\circ$};
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}

  \begin{scope}[rotate around = {\myangle: (0, 0)}]
    \node[font = \scriptsize, fill = white, big dot = {left: \(\tilde{F}^*\)}]
    (FST) at (2 * \ctilde cm, 0) {};
  \end{scope}

  \draw[name intersections = {of = ecc6789rotated and aux1}, -latex] (P1) --
  ($(intersection-2)!.75cm!(intersection-1)$);
  \draw[name intersections = {of = ecc6789rotated and aux2}, -latex] (P2) --
  ($(intersection-1)!.75cm!(intersection-2)$);

  \begin{pgfinterruptboundingbox}
    % To prevent the clipping path from making our picture larger
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0.2 with {\arrow{latex}},
        }]
        \path[clip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw [orange, postaction = decorate] (-\c, 0) ellipse
        [x radius = \a cm, y radius = \b cm];
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}

  \begin{pgfinterruptboundingbox}
    % To prevent the clipping path from making our picture larger
    \begin{pgfonlayer}{background}
      \begin{scope}[decoration = {markings,
          mark = at position 0 with {\arrow{latex}},
        }]
        \path[clip] (0, 0) -- ($(0,0)!100cm!(P1)$) -- (0cm, 100cm) -- 
        ($(0,0)!100cm!(P2)$) -- (0, 0);

        \draw [name intersections = {of = r1 and ecc6789unrotated},
        postaction = decorate%, PineGreen
             ](intersection-2) 
        let
          \p0 = (F),
          \p1 = (P1),
          \p2 = (intersection-2),
          \n1 = {atan2(\y1 - \y0, \x1 - \x0)},
          \n2 = {atan2(\y2 - \y0, \x2 - \x0)},
          \n3 = {\n1 - \n2}
        in \pgfextra{\xdef\myangle{\n3}} [rotate = \n3,
        name path global = ecc6789rotated] (\ctilde, 0) ellipse
        [x radius = \a cm, y radius = \btilde cm];
      \end{scope}
    \end{pgfonlayer}
  \end{pgfinterruptboundingbox}
  \end{tikzpicture}%
}
\stackMath
\stackinset{l}{4.97cm}{b}{3.75cm}{v'_1}{%
\stackinset{l}{4.35cm}{b}{4.4cm}{v_1}{%
\stackinset{l}{0.8cm}{b}{3.3cm}{v'_2}{%
\stackinset{l}{0.1cm}{b}{4.4cm}{v_2}{%
\stackinset{l}{2.3cm}{b}{1.55cm}{\scriptstyle(t_f < t_m)}{%
\stackinset{l}{1.9cm}{b}{5.35cm}{\scriptstyle(t_f < t_m)}{%
\stackinset{l}{4.0cm}{b}{6.4cm}{\scriptstyle(t'_f > t_m)}{%
\stackinset{l}{1.65cm}{b}{4.55cm}{\scriptstyle(t'_f > t_m)}{%
\stackinset{l}{0.3cm}{b}{0.3cm}{\scriptstyle(t'_f > t_m)}{%
  \usebox{\mypic}}%
}}}}}}}}
\end{document}

enter image description here

p.s. By the way, tikz didn't like your "PineGreen" specifier so I commented it out.

share|improve this answer
    
I removed the package xcolor with the option dvipsnames so that is why. –  dustin Sep 1 '13 at 16:15

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.