I'm trying to plot the Earth position with the Sun in the origin. I have two lists like this:
sun = {Subscript[M, S], e0sun = AstronomicalData["Sun", "Position"],v0sun = {0, 0}};
earth = {Subscript[M, T],e0earth = AstronomicalData["Earth", "Position"],v0earth = {0, 0}};
Where the first component is the mass, the second one is the position and the third one is the velocity(I will change this value later).And I have the function position like this:
position[{x1_, x2_, x3_}] = x2;
So the position function for earth and sun returns:
$$\{1.61307\times 10^{10} \text{m},1.46355\times 10^{11} \text{m},241710. \text{m}\}$$ $$\{0 \text{m},0 \text{m},0 \text{m}\}$$
When I try to plot both I do this:
S1 = Graphics3D[Point[position[earth]]];
S2 = Graphics3D[Point[position[sun]]];
Show[S1, S2, Axes -> True]
But I get an error because of the units, I think. I solved it doing:
S1 = Graphics3D[Point[{position[earth][[1, 1]], position[earth][[2, 1]],position[earth][[3, 1]]}]];
And the same for the sun, but I would like to find a better way with the units.
position[Array[x, Length[earth]]] = x[2]
, but it seems wrong to me $\endgroup$