场景 1 : 投影到 Sphere 上
转载自 jsgaobiao
代码
function test()
clear;
clc;
clf;
A = imread('a.jpg');
[x,y,z]=sphere(50);
% Use Sphere or semi-sphere
% z(z>0)=nan;
% z(x<0)=nan;
h=surface(x,y,z);
set(h,'CData',A,'FaceColor','texturemap');%texturemap纹理贴图
%colormap(map);
axis equal;
set(gca,'CameraViewAngleMode','manual');
view(3);
end
效果
球面投影
半球面投影