I am attempting to change the background of my plot3 /surf plot figure to an image of space

27 ビュー (過去 30 日間)
Mohab Wahdan
Mohab Wahdan 2022 年 12 月 2 日
コメント済み: Mohab Wahdan 2022 年 12 月 9 日
I am attempting to insert an image of space to serve as the background of my figure which has bunch of orbits as well as earth plotted on it, I am not sure if it's douable. but I also know that anything is with matlab so this is my first time seeking assistance on the mathworks assisance hub.
here is my code:
alpha = 1 ;
Earth_picture = 'https://www.universetoday.com/wp-content/uploads/2009/09/earthmap.jpg' ;
figure(Color='k')
hold on
axis equal
axis vis3d
axis auto
view(100,20)
[x,y,z] = ellipsoid(0,0,0,r_Earth,r_Earth,r_Earth) ;
Earth = surf(x,y,-z,'FaceColor','none','EdgeColor','none') ;
plot3(r_vect_GEO(:,1),r_vect_GEO(:,2),r_vect_GEO(:,3), ...
r_vect_GTO(:,1),r_vect_GTO(:,2),r_vect_GTO(:,3), ...
r_vect_MEO(:,1),r_vect_MEO(:,2),r_vect_MEO(:,3), ...
r_vect_LEO(:,1),r_vect_LEO(:,2),r_vect_LEO(:,3),'g','LineWidth',2)
legend("Earth","FENGYUN 2H , (GEO)","CZ-7A , (GTO)","CZ-3C , (MEO)","CZ-2D , (LEO)")
CData_image = imread(Earth_picture) ;
set(gca,'NextPlot','add','Visible','off')
set(Earth,'FaceColor','texturemap','CData',CData_image)
and I will be attaching a picture of what I am obtaining.
  1 件のコメント
Mohab Wahdan
Mohab Wahdan 2022 年 12 月 2 日
編集済み: Mohab Wahdan 2022 年 12 月 2 日
and this is the image I am attempting to tag credits: NASA

サインインしてコメントする。

回答 (1 件)

Shivansh
Shivansh 2022 年 12 月 6 日
  1 件のコメント
Mohab Wahdan
Mohab Wahdan 2022 年 12 月 9 日
It is indeed exactly what I was look for !
Thanks for the guidance Shivansh.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by