Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Figure with image mapped to spherical background

1 回表示 (過去 30 日間)
Daire Vickers
Daire Vickers 2021 年 5 月 11 日
閉鎖済み: Daire Vickers 2021 年 5 月 12 日
Hi, I am trying to make a 3-D plot which has a spherical background image. I have tried making a larger sphere that an image is mapped to, and then placing the other data to be plotted inside this sphere, and placing the camera inside the sphere. However when I do this the the figure displays as a circle, rather than the background image filling up the whole square area of the figure.
I have:
and my code is:
axis([-10 10 -10 10 -10 10])
[x,y,z]=sphere(50);
spherescale=10;
hold on
U_im=imread('esoMilkyway.jpg'); % Import texture data for Universe
Bg=surf((x*spherescale),(y*spherescale), (z*spherescale));
set(Bg,'facecolor','texturemap','cdata',U_im,'edgecolor','none');
daspect([1 1 1]);
campos([1 0 0]);
axis off
The effect that I am trying to reproduce can be seen at 20:45 in this video: https://uk.mathworks.com/videos/modeling-and-simulation-with-matlab-a-case-study-in-problem-based-learning-90422.html
Also, when I rotate the figure the camera moves itself out of the sphere which is also something I would like to stop happening. If anyone can help me out that would be greatly appreciated.

回答 (0 件)

この質問は閉じられています。

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by