>> >> >> >> >> >> >> [X,Y,Z]=sphere(50); >> h=surf(X(1:25,:),Y(1:25,:),Z(1:25,:));hold on >> set(h,'facecolor',[0.1 0.1 0.8],'edgecolor','none') >> l2=light('position',[-1 -1 -0.5]); >> g=vizlightvecs; >> view(3) >> set(h,'backfacelightin','lit') >> set(h,'backfacelightin','unlit') >> set(h,'backfacelightin','unlit') >> clf >> h=surf(X(1:25,:),Y(1:25,:),Z(1:25,:));hold on >> set(h,'facecolor',[0.1 0.1 0.8],'edgecolor','none') >> l2=light('position',[-1 -1 -0.5]); >> set(h,'backfacelightin','unlit') >> set(h,'backfacelightin','reverselit') >> set(l2,'style','local') >> set(l2,'position',[-.25 -.25 -.25]) >> clear >> close >> >> >> >> load GOMtopex >> whos Name Size Bytes Class C 326x256 667648 double array Z 326x256 667648 double array Z2 326x256 667648 double array map 513x3 12312 double array x 256x1 2048 double array y 326x1 2608 double array Grand total is 252489 elements using 2019912 bytes >> h=surf(x,y,Z); >> shading interp >> I=find(Z>0); >> clf >> plot(Z(I),Z2(I),'.') >> h=surf(x,y,Z2); >> shading interp >> clf >> plot(Z2(:),C(:),'.') >> h=surf(x,y,Z2);shading interp >> set(h,'cdata',C);caxis([-1 1]) >> colormap(map);colorbar >> view([0 78]) >> set(gca,'zlim',[-500 10],'xlim',[-71.62 -64.843], 'ylim',[39 45.7616]); >> l=camlight(0,180); >> set(h,'backfacelightin','lit') >> l=light('position',[-220 200 100],'style','local'); >> material dull >> set(h,'facelighting','gouraud') >> diary off