# TikZ: surface of revolution of a hyperbolic trajectory

So I have no idea on how to construct a surface of revolution of a hyperbolic trajectory from a injection point. For simplicity, let's make the injection point (0, 0). Unfortunately, I don't know what to give as a MWE for a starting point. I could give the very basic though.

\documentclass[convert = false, tikz]{standalone}
% maybe these packages will be needed
%\usetikzlibrary{arrows}
%\usetikzlibrary{calc}
%\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\end{tikzpicture}
\end{document}


I am still looking for a solution that can come close to replication the image since I want to put a circle with the earth where the trajectories meet.

-
Those are funny hyperbolas. Could you point to the source of that image? – Jake Jul 27 '13 at 1:27
– dustin Jul 27 '13 at 1:55

I approximated the lines as parabolas. As usual with TikZ and 3D, this only works in the given configuration. The surface is made up of many (3456) little pieces, you'll see artifacts of the tiling. Also, the result reminds me of both Monoculus and Sputnik:

## Code

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{arrows}

\begin{document}

\begin{tikzpicture}[    x={(-30:1cm)},
y={(90:1cm)},
z={(45:1cm)},
scale=2,
]
\foreach \d in {180,190,...,270}
{   \foreach \z in {0.2,0.25,...,4.95}
{ \fill[opacity=0.4,red] ({cos(\d)*sqrt(\z)},{sin(\d)*sqrt(\z)},{\z}) -- ({cos(\d+10)*sqrt(\z)},{sin(\d+10)*sqrt(\z)},{\z}) -- ({cos(\d+10)*sqrt(\z+0.05)},{sin(\d+10)*sqrt(\z+0.05)},{\z+0.05}) -- ({cos(\d)*sqrt(\z+0.05)},{sin(\d)*sqrt(\z+0.05)},{\z+0.05}) -- cycle;
}
}

\foreach \d in {180,190,...,280}
{   %\fill[opacity=0.5]
\draw[-latex,thick] ({cos(\d)*sqrt(0.2)},{sin(\d)*sqrt(0.2)},{0.2})
\foreach \z in {0.2,0.25,...,5}
{ -- ({cos(\d)*sqrt(\z)},{sin(\d)*sqrt(\z)},{\z})};
}

\foreach \d in {-80,-70,...,160}
{   \foreach \z in {0.2,0.25,...,4.95}
{ \fill[opacity=0.5,red] ({cos(\d)*sqrt(\z)},{sin(\d)*sqrt(\z)},{\z}) -- ({cos(\d+10)*sqrt(\z)},{sin(\d+10)*sqrt(\z)},{\z}) -- ({cos(\d+10)*sqrt(\z+0.05)},{sin(\d+10)*sqrt(\z+0.05)},{\z+0.05}) -- ({cos(\d)*sqrt(\z+0.05)},{sin(\d)*sqrt(\z+0.05)},{\z+0.05}) -- cycle;
}
}

\foreach \d in {-70,-60,...,170}
{   \draw[-latex,thick] ({cos(\d)*sqrt(0.2)},{sin(\d)*sqrt(0.2)},{0.2})
\foreach \z in {0.2,0.25,...,5}
{ -- ({cos(\d)*sqrt(\z)},{sin(\d)*sqrt(\z)},{\z})};
}

\draw[very thick, green] (0,0,0.2) circle ({sqrt(0.2)});
\end{tikzpicture}

\end{document}


## Output

-

Here's one way of doing this that uses PGFPlots. Note that there's quite a bit of fudging involved, because PGFPlots can't sort the elements from different \addplot commands:

\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis equal image,
hide axis,
width=10cm
]
z buffer=sort,
surf,
samples=15,
samples y=35,
y domain=0:360,
fill=yellow!80,
draw opacity=0,
line join=round,
] ({x*cos(y)}, {sqrt(1 + x^2)*3}, {x*sin(y)});

\pgfplotsinvokeforeach{-60,-30,...,180}{
samples y=1,
draw=black,
samples=15,
domain=0.5:5, -latex
] ({x*cos(#1)}, {sqrt(1 + x^2)*3}, {x*sin(#1)});
}

samples y=1,
samples=51,dashed,
domain=0:360
] ({5*cos(x)}, {sqrt(1 + 5^2)*3}, {5*sin(x)});

samples y=1,
samples=51,
domain=0:360
] ({0.5*cos(x)}, {sqrt(1 + 0.55^2)*3}, {0.5*sin(x)});
\end{axis}
\end{tikzpicture}
\end{document}

-
@dustin: You can use domain=0.4:5 instead of domain=0.2:5, for example. Is that what you mean? Yes, you can add arrowheads. Remove the smooth option and add -latex. – Jake Jul 27 '13 at 2:53
@dustin: Sure, you just need to find the right parameters for the hyperbolas. – Jake Jul 27 '13 at 3:29
Jake no matter how I adjust, I can't get anything that would seem to fit. Do you think we could construct the picture without worrying about exact hyperbolas? – dustin Jul 27 '13 at 15:49