例5-28.m

来自「这是一个MATLAB7.0基础与提高例题的所有源码」· M 代码 · 共 21 行

M
21
字号
>> clf;                                          	%<1>
>> [x,y,z]=sphere(40);                              	%<2>
>> colormap(jet)                                   	%<3>
>> subplot(1,2,1);                                  	%<4>
>> surf(x,y,z)                                     	%<5>
>> shading interp                                   	%<6>
>> light('position',[0,-10,1.5],'style','infinite')             	%<7>
>> lighting phong                                   	%<8>
>> material shiny                                   	%<9>
>> subplot(1,2,2);                                   	%<10>
>> surf(x,y,z,-z)                                     	%<11>
>> shading flat                                      	%<12>
>> light;lighting flat                                  	%<13>
>> light('position',[-1,-1,-2],'color','y')                    	%<14>
>> light('pisition',[-1,0.5,1],'style','local','color','w')          	%<15>





⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?