8
$\begingroup$

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.

enter image description here

$\endgroup$
  • 4
    $\begingroup$ 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. $\endgroup$ – Organic Marble May 16 at 13:05
  • $\begingroup$ @OrganicMarble - Yes, those lines. I couldn't add the pic. $\endgroup$ – Raj Arjit May 16 at 18:47
  • 2
    $\begingroup$ @OrganicMarble - cool. Thanks. $\endgroup$ – Raj Arjit May 16 at 18:51
  • 1
    $\begingroup$ 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? $\endgroup$ – uhoh May 17 at 1:34
  • 1
    $\begingroup$ @uhoh Thanks, I was just guessing. You wrote an authoritative answer. $\endgroup$ – Organic Marble May 17 at 2:06
11
$\begingroup$

@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.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

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]]
degs, rads        = 180./pi, pi/180.
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:
        lines = infile.read().splitlines()

    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]
    ax  = fig.add_subplot(1, 1, 1)

    for body in bodies:
        x, y, z = body.pos_r
        ax.plot(x, y)
        for x, y, z in Pioneer_11.pos_r.T[::100]:
            plt.plot([x, x], [y, y-z], '-k')
    plt.show()
| improve this answer | |
$\endgroup$
  • $\begingroup$ I should have drawn the lines in the 3D plot then viewed at an angle, rather than in a 2D plot, With that perspective my plot would match exactly. Right now Saturn looks a little funky relative to Pioneer 11 at the upper left because of the projection on to the ecliptic and the lack of perspective. $\endgroup$ – uhoh May 16 at 21:29
  • $\begingroup$ I've just asked Why did Pioneer 11 use a gravitational assist to swing above the ecliptic plane... twice? $\endgroup$ – uhoh May 17 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.