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.

Is there a high speed way to draw the evolution of an ellipse, to a parabola, and then into a few hyperbolas with the same focus?

enter image description here

From the picture, we see that we start out with three elliptical orbits around Earth all with Earth being the focus. The ellipse progress from no intersection with the moons orbit, to a Hohmann transfer ellipse, and then an ellipse with to intersections. After the ellipse evolution, the next orbit is parabolic and then it finishes with three hyperbolic orbits.

I could draw all these individually, but I believe there could be a way to do this without such a tedious method.

\documentclass[convert = false, tikz]{standalone}

%\usepackage{fp}                                                                    
%\usetikzlibrary{fixedpointarithmetic}                         
%\usetikzlibrary{calc}
%\usetikzlibrary{intersections}                                                 

\begin{document}
\begin{tikzpicture}
  \coordinate (E) at (0, 0);

  \def\moonrad{4cm}

  \draw (E) [partial circle = -15:150:\moonrad];
  \shadedraw[gray, left color = orange!75!blue, right color = blue!75!black]
  (E) circle[radius = .3cm];
\end{tikzpicture}
\end{document}

enter image description here


Using percusse idea, I have constructed the ellipse, parabola, and hyperbolas. Unfortunately, I am not sure how I can shift them in the \foreach command to place them all at (0, -.5).

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

  \def\moonrad{4cm}
  \def\dom{3}

  \draw (E) [partial circle = -15:150:\moonrad];
  \shadedraw[gray, left color = orange!75!blue, right color = blue!75!black]
  (E) circle[radius = .2cm];

  \foreach \a/\b/\type in {.75/1/dashed, 1.25/2.25/dotted, 1.5/3/}{
    \draw[\type] (0, -.5) arc[x radius = \a, y radius = \b, start angle =-90,
    end angle = 270];
  }

  \begin{scope}[shift = {(0, -.5)}]
    \draw plot[domain = 0:\dom, samples = 500] ({\x}, {.5 * (\x)^2});
  \end{scope}

  \foreach \a/\angle in {1.5/30, 2/45, 3/60}{
    \pgfmathsetmacro{\b}{\a / tan(\angle)}
    \draw plot[domain = 0:\dom, samples = 500]
    ({\x}, {\a * sqrt(1 + (\x / \b)^2)});
  }

enter image description here

share|improve this question

2 Answers 2

I would do something along the lines of

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[]
\clip (-4cm,-2.5cm) rectangle (5cm,5cm);
\draw (3.5cm,-2cm) arc (0:150:3.5 cm);

\foreach \x/\y in {1/dashed,1.5/dotted,2.5/}{
\draw[\y] (0,-2) arc (-90:270:0.5cm+3*\x mm and \x cm);
}

\foreach \x in {10,25,50,75}{
\draw[] (0,-2) arc (-90:30:0.5cm+3*\x mm and \x cm);
}

\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer
up vote 1 down vote accepted

I was able to use percusse answer but add to it to achieve the desired result.

\documentclass[convert = false, tikz]{standalone}

\usetikzlibrary{calc}
\tikzset{
  partial circle/.style args = {#1:#2:#3}{
    insert path = {+ (#1:#3) arc (#1:#2:#3)}
  }
}
\begin{document}
\begin{tikzpicture}[line join = round, line cap = round, >=triangle 45,
  every label/.append style = {font = \scriptsize},
  dot/.style = {inner sep = +0pt, shape = circle,
    draw = black, label = {#1}},
  small dot/.style = {minimum size = .05cm, dot = {#1}},
  big dot/.style = {minimum size = .1cm, dot = {#1}},
  ]
  \coordinate (E) at (0, 0);

  \def\moonrad{4cm}
  \def\dom{3.1}

  \draw (E) [partial circle = -15:150:\moonrad];
  \shadedraw[gray, left color = orange!75!blue, right color = blue!75!black]
  (E) circle[radius = .2cm];

  \foreach \a/\b/\type in {.75/1/dashed, 1.25/2.25/dotted, 1.5/3/}{
    \draw[\type] (0, -.5) arc[x radius = \a, y radius = \b, start angle =-90,
    end angle = 270];
  }

  \begin{scope}[shift = {(0, -.5)}]
    \draw plot[domain = 0:\dom, samples = 500] ({\x}, {.5 * (\x)^2});
  \end{scope}

  \foreach \a/\angle/\i in {1.5/30/3, 2/45/2.1, 3/60/1}{
    \pgfmathsetmacro{\b}{\a / tan(\angle)}
    \begin{scope}[shift = {(0, -\a - .5)}]
      \draw plot[domain = 0:{\dom + \i}, samples = 500]
      ({\x}, {\a * sqrt(1 + (\x / \b)^2)});
    \end{scope}
  }
\end{tikzpicture}
\end{document}

enter image description here

Now all I need to do is adjust the hyperbolas how I like.

share|improve this answer

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.