# adding complexity to a hyperbolic trajectory

Jubobs generated this code from Drawing a hyperbolic trajectory.

If we draw a horizontal line that intersects the hyperbola (I really dont want to add this to the picture), we would have some angle. I want to make this angle 90. How can we do this? I know we could use rotate around but what would we rotate around to keep the same orientation of the trajectory? (0,0) is not the point and how much would we need to rotate it?

Additionally, the trajectory has to be offset 16193.6km from the center of the earth. So if we want the trajectory to pass by Earth at Periapsis with 6878 km, we need to have the a ratio offset of 2.3544.

Is there a cleaner method?

\usepackage{tikz}
\begin{document}

\begin{center}
\begin{tikzpicture}[scale=2]
\pgfmathsetmacro{\e}{1.44022}               % eccentricity of the hyperbola
\pgfmathsetmacro{\a}{1}
\pgfmathsetmacro{\b}{\a*sqrt((\e)^2 - 1)}
\pgfmathsetmacro{\c}{sqrt((\a)^2+(\b)^2}    % distance from centre to focus
\pgfmathsetmacro{\thetamax}{1.2}

\draw plot[domain = -\thetamax:\thetamax] ({\a*cosh(\x)}, {\b*sinh(\x)});

\path (\c,0) node(a) {\includegraphics[width=.5cm]{earth.png}};

\pgfmathtruncatemacro{\N}{8}  % an even number is best here
\pgfmathsetmacro{\thetaoffset}{.05*\thetamax}
\foreach \k in {0,1,...,\N}{
\pgfmathsetmacro{\theta}{(\thetamax-\thetaoffset)*(2*\k/\N-1)}

}
\end{tikzpicture}
\end{center}
\end{document}


Here is a crude drawing:

-

I ended up just rotating everything around the focus which is a*e

 \begin{center}
\begin{tikzpicture}[line join = round, line cap = round, scale = 4,
>=triangle 45]
\draw (2.2,0) -- (.46,0.13);
\draw (0.57,0) -- (2.2,0);
\draw[rotate around = {-43.9:(.576088,0)}] (0,0) -- (.65,0);
\begin{scope}[decoration = {markings,
mark = at position 0.2 with {\arrow{>}},
mark = at position 0.7 with {\arrow{>}}, }]
\pgfmathsetmacro{\e}{1.44022}
\pgfmathsetmacro{\a}{.4}
\pgfmathsetmacro{\b}{\a*sqrt((\e)^2 - 1)}
\pgfmathsetmacro{\c}{sqrt((\a)^2+(\b)^2}
\pgfmathsetmacro{\thetamax}{1.5}

top color=yellow!70,%
bottom color=red!70,%

\draw[postaction = decorate, rotate around = {-43.9:(.576088,0)}]
plot[domain = -\thetamax:\thetamax]
({\a*cosh(\x)}, {\b*sinh(\x)});

\path (\c,0) node(a) {\includegraphics[width=.5cm]{earth.png}};

\pgfmathtruncatemacro{\N}{6}  % an even number is best here
\pgfmathsetmacro{\thetaoffset}{.05*\thetamax}
\foreach \k in {0,1,...,\N}{
\pgfmathsetmacro{\theta}{(\thetamax-\thetaoffset)*(2*\k/\N-1)}
\shade[top color = black, bottom color = gray, rotate around
= {-43.9:(.576088,0)}]
}
\end{scope}
\begin{scope}[rotate around = {-43.9:(.576088,0)}]
\draw (0,0) -- (46.0254:1.25cm);
\draw (0,0) -- (-46.0254:1.25cm);
\draw (-46.0254:.2cm) arc (-46.0254:46.0254:.2cm);
\node[scale = .75, fill = white, inner sep = .01cm] at (23:.2cm)
{$\beta$};
\node[scale = .75, fill = white, inner sep = .01cm] at (-23:.2cm)
{$\beta$};
\end{scope}
\end{tikzpicture}
\end{center}

-