- #1

Dustinsfl

- 2,281

- 5

This is a fun TikZ picture to play with.

[LATEXS]\documentclass[convert = false]{standalone}

\usepackage[utf8]{inputenc}

% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt

\renewcommand{\rmdefault}{ppl} % rm

\linespread{1.05} % Palatino needs more leading

\usepackage[scaled]{helvet} % ss

\usepackage{courier} % tt

% \usepackage{euler} % math

\usepackage{eulervm}

% a better implementation of the euler package (not in gwTeX)

\normalfont

\usepackage[T1]{fontenc}

\usepackage{textcomp}

\usepackage[usenames, dvipsnames]{xcolor}

\usepackage{tikz}

\usetikzlibrary{arrows}

\usetikzlibrary{calc}

\usetikzlibrary{decorations.markings}

\usetikzlibrary{backgrounds}

\usetikzlibrary{intersections}

\begin{document}

\begin{tikzpicture}

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

\def\angle{50}

\def\circradius{.35}

\def\a{1.15}

\def\asymlen{4.75}

\pgfmathsetmacro{\b}{\a / tan(\angle)}

\draw[dashed, latex-] (-4, 0) -- (O) node[font = \tiny, pos = .14, above]

{To the Sun};

\draw[dashed, name path = dashed] (0, -4) -- (0, 2.5);

\draw[-latex] (0, 2.65) -- (0, 3.5) node[font = \tiny, above]

{\(\mathbf{V}_1\)};

\draw[thick, gray, name path global = circ] (O) circle[radius = 3cm];

\draw (O) circle[radius = \circradius];

\draw (O) -- (-\angle:1.5cm) coordinate (C);

\draw (O) -- ({180 - \angle}:3cm) node[pos = .5, font = \tiny,

rotate = {360 - \angle}, align = center]

{Aspe line of the\\ departure hyperbola};

\draw[red, name path = asym1] (-\angle:1.5cm) -- +(0, 4.5) coordinate (P2)

node[font = \tiny, rotate = -90, pos = .5, above] {Asymptote};

\shadedraw[gray, left color = orange!80!white!30!red!50,

right color = blue!90!green!70!purple!30] (O) circle[radius = .2cm];

\filldraw[black] (-\angle:.35cm) circle[radius = .02cm] node[below,

font = \tiny] {P};

\begin{scope}[rotate = {90 - \angle}, shift = {(0, {-\a - \circradius})},

on background layer]

\draw[red, -latex] plot[domain = 0:3, samples = 100]

({\x}, {\a * sqrt(1 + (\x / \b)^2)}) node[font = \tiny, above, black]

{\(\mathbf{v}_{\infty}\)};

\begin{pgfinterruptboundingbox}

\path[name path global = asym2] ({180 - \angle}:0) --

({180 - \angle}:7);

\end{pgfinterruptboundingbox}

\path[name intersections = {of = circ and asym2, by = P1}];

\draw[dashed, red] ({180 - \angle}:0) -- (P1);

\end{scope}

\draw[on background layer] let

\p0 = (C),

\p1 = (O),

\p2 = (P2),

\n1 = {atan2(\x1 - \x0, \y1 - \y0)},

\n2 = {atan2(\x2 - \x0, \y2 - \y0)},

\n3 = {.75cm},

\n4 = {(\n1 + \n2) / 2}

in (C) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]

node[font = \tiny] at ([shift = (C.center)] \n4:.5cm) {\(\beta\)};

\begin{pgfinterruptboundingbox}

\path[name path global = perp] (-1, 2.49) -- (5, 2.49);

\end{pgfinterruptboundingbox}

\path[name intersections = {of = dashed and perp, by = P3}];

\path[name intersections = {of = asym1 and perp, by = P4}];

\draw[latex-latex] (P3) -- (P4) node[pos = .5, fill = white, inner sep = 0,

font = \tiny] {\(\Delta\)};

\end{tikzpicture}

\end{document}

[/LATEXS]

You can play around with the angle Latex Code:

\def\angle{50}

by changing the number. Everything is built off of this angle so the picture will adjust as you change it.

Additionally, you can play around with these parameters (below):

Latex Code:

\def\circradius{.35} \def\a{1.15}

As you adjust your angle, the hyperbola will be shorten or lengthened depending on your adjustment. You can increase or decrease by adjusting Latex Code:

domain = 0:3

in the code below.

Latex Code:

draw[red, -latex] plot[domain = 0:3, samples = 100] ({\x}, {\a * sqrt(1 + (\x / \b)^2)}) node[font = \tiny, above, black] {\(\mathbf{v}_{\infty}\)};

You only need to adjust the 3. Lower will shorten the hyperbola and higher will lengthen it. If you remove 0 and add the negative symmetric value, you will plot the whole portion of this piece of the hyperbola.

https://imageshack.us/a/img818/8527/70ge.png

[LATEXS]\documentclass[convert = false]{standalone}

\usepackage[utf8]{inputenc}

% Euler for math | Palatino for rm | Helvetica for ss | Courier for tt

\renewcommand{\rmdefault}{ppl} % rm

\linespread{1.05} % Palatino needs more leading

\usepackage[scaled]{helvet} % ss

\usepackage{courier} % tt

% \usepackage{euler} % math

\usepackage{eulervm}

% a better implementation of the euler package (not in gwTeX)

\normalfont

\usepackage[T1]{fontenc}

\usepackage{textcomp}

\usepackage[usenames, dvipsnames]{xcolor}

\usepackage{tikz}

\usetikzlibrary{arrows}

\usetikzlibrary{calc}

\usetikzlibrary{decorations.markings}

\usetikzlibrary{backgrounds}

\usetikzlibrary{intersections}

\begin{document}

\begin{tikzpicture}

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

\def\angle{50}

\def\circradius{.35}

\def\a{1.15}

\def\asymlen{4.75}

\pgfmathsetmacro{\b}{\a / tan(\angle)}

\draw[dashed, latex-] (-4, 0) -- (O) node[font = \tiny, pos = .14, above]

{To the Sun};

\draw[dashed, name path = dashed] (0, -4) -- (0, 2.5);

\draw[-latex] (0, 2.65) -- (0, 3.5) node[font = \tiny, above]

{\(\mathbf{V}_1\)};

\draw[thick, gray, name path global = circ] (O) circle[radius = 3cm];

\draw (O) circle[radius = \circradius];

\draw (O) -- (-\angle:1.5cm) coordinate (C);

\draw (O) -- ({180 - \angle}:3cm) node[pos = .5, font = \tiny,

rotate = {360 - \angle}, align = center]

{Aspe line of the\\ departure hyperbola};

\draw[red, name path = asym1] (-\angle:1.5cm) -- +(0, 4.5) coordinate (P2)

node[font = \tiny, rotate = -90, pos = .5, above] {Asymptote};

\shadedraw[gray, left color = orange!80!white!30!red!50,

right color = blue!90!green!70!purple!30] (O) circle[radius = .2cm];

\filldraw[black] (-\angle:.35cm) circle[radius = .02cm] node[below,

font = \tiny] {P};

\begin{scope}[rotate = {90 - \angle}, shift = {(0, {-\a - \circradius})},

on background layer]

\draw[red, -latex] plot[domain = 0:3, samples = 100]

({\x}, {\a * sqrt(1 + (\x / \b)^2)}) node[font = \tiny, above, black]

{\(\mathbf{v}_{\infty}\)};

\begin{pgfinterruptboundingbox}

\path[name path global = asym2] ({180 - \angle}:0) --

({180 - \angle}:7);

\end{pgfinterruptboundingbox}

\path[name intersections = {of = circ and asym2, by = P1}];

\draw[dashed, red] ({180 - \angle}:0) -- (P1);

\end{scope}

\draw[on background layer] let

\p0 = (C),

\p1 = (O),

\p2 = (P2),

\n1 = {atan2(\x1 - \x0, \y1 - \y0)},

\n2 = {atan2(\x2 - \x0, \y2 - \y0)},

\n3 = {.75cm},

\n4 = {(\n1 + \n2) / 2}

in (C) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]

node[font = \tiny] at ([shift = (C.center)] \n4:.5cm) {\(\beta\)};

\begin{pgfinterruptboundingbox}

\path[name path global = perp] (-1, 2.49) -- (5, 2.49);

\end{pgfinterruptboundingbox}

\path[name intersections = {of = dashed and perp, by = P3}];

\path[name intersections = {of = asym1 and perp, by = P4}];

\draw[latex-latex] (P3) -- (P4) node[pos = .5, fill = white, inner sep = 0,

font = \tiny] {\(\Delta\)};

\end{tikzpicture}

\end{document}

[/LATEXS]

You can play around with the angle Latex Code:

\def\angle{50}

by changing the number. Everything is built off of this angle so the picture will adjust as you change it.

Additionally, you can play around with these parameters (below):

Latex Code:

\def\circradius{.35} \def\a{1.15}

As you adjust your angle, the hyperbola will be shorten or lengthened depending on your adjustment. You can increase or decrease by adjusting Latex Code:

domain = 0:3

in the code below.

Latex Code:

draw[red, -latex] plot[domain = 0:3, samples = 100] ({\x}, {\a * sqrt(1 + (\x / \b)^2)}) node[font = \tiny, above, black] {\(\mathbf{v}_{\infty}\)};

You only need to adjust the 3. Lower will shorten the hyperbola and higher will lengthen it. If you remove 0 and add the negative symmetric value, you will plot the whole portion of this piece of the hyperbola.

https://imageshack.us/a/img818/8527/70ge.png

Last edited: