Fork me on GitHub

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')

 

posted @ 2014-10-22 10:44  劲风天下  阅读(869)  评论(0编辑  收藏  举报