# What do the shaded vertical lines in the animation of Gravity assists of space probes, mean?

Example Animations from Wikipedia —

https://en.wikipedia.org/wiki/Gravity_assist#/media/File:Animation_of_Voyager_1_trajectory.gif

https://en.wikipedia.org/wiki/File:Animation_of_Pioneer_11_trajectory.gif

https://en.wikipedia.org/wiki/File:Animation_of_Pioneer_11_trajectory_around_Jupiter.gif

An example of the lines being asked about is indicated by the red arrow.

• Are you talking about these lines (red arrow)? imgur.com/ef0UY5z Suggest adding this picture to your question (I can do it if your rep does not allow). Anyway, it looks like it's the distance from the ecliptic plane. – Organic Marble May 16 '20 at 13:05
• @OrganicMarble - Yes, those lines. I couldn't add the pic. – Raj Arjit May 16 '20 at 18:47
• @OrganicMarble - cool. Thanks. – Raj Arjit May 16 '20 at 18:51
• This was a great question! fyi I've just asked Why did Pioneer 11 use a gravitational assist to swing above the ecliptic plane... twice? – uhoh May 17 '20 at 1:34
• @uhoh Thanks, I was just guessing. You wrote an authoritative answer. – Organic Marble May 17 '20 at 2:06

@OrganicMarble nailed it: ...it looks like it's the distance from the ecliptic plane.

Yep, it's height above/below the ecliptic, a way to represent 3D in a 2D plot.

At first I thought they might be thrust vectors like these but no, these are ballistic arcs. Instead I am 99.44% certain that these lines are use to indicate height above/below the plane of the ecliptic.

Below is the GIF for Pioneer 11 from Earth to a Jupiter flyby to Saturn. I've downloaded the data from JPL's Horizons and plotted it. In the 2D plot in the plane of the ecliptic I've added lines every 100 days whose lengths in the $$\mathbf{\hat{y}}$$ direction are equal to the position in $$\mathbf{z}$$. It seems to match well.

final frame of this GIF

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

class Body(object):
def __init__(self, name):
self.name = name

def rotate_it(vec, theta):
cth, sth = [f(theta) for f in (np.cos, np.sin)]
x, y, z = vec
xr = cth*x - sth*y
yr = cth*y + sth*x
return np.vstack((xr, yr, z))

def makecubelimits(axis, centers=None, hw=None):
# xlims, ylims, zlims = ax.get_xlim(), ax.get_ylim(), ax.get_zlim()
lims = ax.get_xlim(), ax.get_ylim(), ax.get_zlim()
# llims, ulims = zip(*lims)
if centers == None:
centers = [0.5*sum(pair) for pair in lims]

if hw == None:
widths  = [pair[1] - pair[0] for pair in lims]
hw      = 0.5*max(widths)
ax.set_xlim(centers[0]-hw, centers[0]+hw)
ax.set_ylim(centers[1]-hw, centers[1]+hw)
ax.set_zlim(centers[2]-hw, centers[2]+hw)
print ('hw was None so set to: ', hw)
else:
try:
hwx, hwy, hwz = hw
print('ok hw requested: ', hwx, hwy, hwz)

ax.set_xlim(centers[0]-hwx, centers[0]+hwx)
ax.set_ylim(centers[1]-hwy, centers[1]+hwy)
ax.set_zlim(centers[2]-hwz, centers[2]+hwz)
except:
print ('nope hw requested: ', hw)
ax.set_xlim(centers[0]-hw, centers[0]+hw)
ax.set_ylim(centers[1]-hw, centers[1]+hw)
ax.set_zlim(centers[2]-hw, centers[2]+hw)

return centers, hw

names  = ['Sun', 'Earth', 'Jupiter', 'Saturn', 'Pioneer_11']

halfpi, pi, twopi = [f*np.pi for f in [0.5, 1.0, 2.0]]
AU                = 149597870.700  # kilometers

bodies = []
for name in names: # horizons_results Pioneer_11.txt
fname = 'horizons_results ' + name + '.txt'
with open(fname, 'r') as infile:

iSOE = [i for i, line in enumerate(lines) if "$$SOE" in line][0] iEOE = [i for i, line in enumerate(lines) if "$$EOE" in line][0]

print(iSOE, iEOE, lines[iSOE], lines[iEOE])
lines = [line.split(',') for line in lines[iSOE+1:iEOE]]
JD  = np.array([float(line[0]) for line in lines])
pos = np.array([[float(item) for item in line[2:5]] for line in lines])
vel = np.array([[float(item) for item in line[5:8]] for line in lines])
body = Body(name)
body.lines = lines
body.JD = JD
body.pos = pos.T.copy()
body.vel = vel.T.copy()
bodies.append(body)

theta = +np.pi/4.

for body in bodies:
body.pos_r = rotate_it(body.pos, -theta)
body.vel_r = rotate_it(body.vel, -theta)

Sun, Earth, Jupiter, Saturn, Pioneer_11 = bodies

if True:
fig = plt.figure(figsize=[10, 8])  # [12, 10]
ax  = fig.add_subplot(1, 1, 1, projection='3d')

for body in bodies:
x, y, z = body.pos
ax.plot(x, y, z)

c, h = makecubelimits(ax, centers=(0, 0, 0), hw=None)
print(c, h)
plt.show()

if True:
fig = plt.figure(figsize=[10, 8])  # [12, 10]