MATLAB light material lighting

时间:2021-01-16 15:43:30

MATLAB light  material  lighting

clf;
[X,Y,Z]=sphere(40);
colormap(jet)
subplot(1,2,1),surf(X,Y,Z),axis off square,shading interp
light('position',[0 -10 1.5],'style','infinite')

material shiny
subplot(1,2,2),surf(X,Y,Z,-Z),axis off square ,shading flat
light;
lighting flat
light('position',[-1,-1,-2],'color','y')
light('position',[-1,0.5,1],'style','local','color','w')
set(gcf,'Color','w')