I am positive I could create the incoming hyperbolas and then the deflections by the planet by hand for each one, but how the image is set up conjures up the felling this could be done through automation of a loop.
\documentclass[convert = false, tikz]{standalone}
\usetikzlibrary{arrows}
\tikzset{
partial circle/.style args = {#1:#2:#3}{
insert path = {+ (#1:#3) arc (#1:#2:#3)}
}
}
\begin{document}
\begin{tikzpicture}
\def\angle{60}
\def\a{1}
\def\circradius{.3}
\pgfmathsetmacro{\b}{\a / tan(\angle)}
\begin{scope}[rotate = {180 - \angle}, shift = {(0, -\a - \circradius)}]
\draw plot[red, domain = 0:2.5, samples = 100]
({\x}, {\a * sqrt(1 + (\x / \b)^2)});
\end{scope}
\draw (0, 0) circle[radius = \circradius];
\draw[-latex] (.4, 0) -- (1, 0);
\draw[dashed] (-5, 0) -- (.2, 0);
\draw[thick, gray] (0, 0) [partial circle = -210:-150:4cm];
\end{tikzpicture}
\end{document}
The issues at hand are:
stopping ever hyperbola at the arc. How can this be done? I don't see how intersections could be used here. Even if we did a path of the hyperbola first and identified the intersection, how do I say draw from a function to a point? I just put 2.5 as the domain and it worked well but that was purely luck.automating the process with a loop for 5 different hyperbolas.setting up the deflection curves.
having the color of each hyperbola cycle.using
decorations.markings
to decoratepostaction
with an arrow. Does that work well in a loop? If so, I wouldn't know how to achieve it unless there isn't anything special to do.
We could use \path
to add in circle radius of fictitious circles for the other hyperbolas, but again, I am not versed in using loops
or foreach
in TikZ
. So the only challenge I would think is the deflection trajectories. I don't have a model for them and they would differ per planet but that last part is irrelevant since I am just showing a diagram of what would happen for an arbitrary planet.
How can those partials hyperbolas and then the ensuing deflections be automated with a foreach loop
?
Here is a reference link on how Jubob's added a hyperbola using periapsis and the fact that the equation for a hyperbola is x^2/a^2 - y^2/b^2 = 1
. Additionally, form the figure, we know that the asymptote runs parallel to the x axis.
TikZ: constructing a piece of a hyperbola with a given asymptote