TikZ:绘制椭圆到双曲线的演变,焦点相同

TikZ:绘制椭圆到双曲线的演变,焦点相同

有没有一种高速的方法可以绘制椭圆演变成抛物线,然后再演变成几条具有相同焦点的双曲线?

在此处输入图片描述

从图中我们可以看到,一开始是围绕地球的三条椭圆轨道,所有轨道都以地球为焦点。椭圆从与月球轨道无交点发展到霍曼转移椭圆,然后是与月球轨道有交点的椭圆。椭圆演变后,下一个轨道是抛物线,然后以三条双曲线轨道结束。

我可以单独绘制所有这些,但我相信有一种方法可以做到这一点,而不需要如此繁琐的方法。

\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}

在此处输入图片描述


使用 percusse idea,我构造了椭圆、抛物线和双曲线。不幸的是,我不知道如何在命令中移动它们\foreach以将它们全部放置在(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)});
  }

在此处输入图片描述

答案1

我会做一些类似的事情

\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}

在此处输入图片描述

答案2

我能够使用打击乐答案,但要对其进行添加才能达到预期的结果。

\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}

在此处输入图片描述

现在我需要做的就是根据自己的喜好调整双曲线。

相关内容