Home > Software engineering >  Plotting far away objects in a 3D plot, Matlab
Plotting far away objects in a 3D plot, Matlab

Time:12-27

I have the 3D plot of an orbit around the Earth and the surface plot of the Earth itself. I want to see the Sun in the right spot too, but if I plot the surface plot of the Sun, the plot zooms out too much. I want to see only objects near Earth, while being able to spot the Sun in the distance. Do you have any tips to achieve that? I have the relative position of the Sun wrt the Earth, the Earth center is the origin of the plot. P.S.: I can zoom in the plot but results are not nearly good enough. Earth is so small that the zoom stops working before reaching it This is the plot as of now:

This is the plot without the Sun:

This is the code (plot only):

figure('Color','k');
%rotate3d;
% Black background and planets
           
  • Related