A small addition to the Orion project

Here’s a little extra visualisation work, handy for extracting vectors from a list of co-ords in tuples.

def get_vectors(star_list):
  x, y, z = ([] for i in range(3))
  for star in local_stars:
    x.append(star[0])
    y.append(star[1])
    z.append(star[2])
  return x, y, z

bd = (2.301, 18.38, -1.191)
g99 = (0.20, 17.5, 0.83)
proc = (-4.769, 10.31, 1.039)
la93 = (8.457, -2.036, -6.286)
luy = (-4.592, 11.45, 1.128)
cd = (11.30, 0.267, -8.630)
sol = (0,0,0)

local_stars = [bd, g99, proc, la93, luy, cd]
x, y, z = get_vectors(local_stars)

new_fig_3d = plt.figure()
ax = new_fig_3d.add_subplot(1,1,1, projection='3d')
ax.scatter(x, y, z, color='red', s=44)
ax.scatter(sol[0], sol[1], sol[2], color='blue', s=55)
plt.title('Sol local stars relative positions')
plt.show()