[附注]色调函数function sun_0(X,Y,Z)
%[0 0 0]黑,[1 1 1]白;
% 1 0 0――红
% 0 1 0――绿
% 0 0 1――兰;
% 1 0 1――粉红=红+兰;
% 1 1 0――黄 =红+绿;
% 0 1 1――天兰=绿+兰;
%0<N<1=中间色;
surf(X,Y,Z);hold on;%树(H=0.3)
for I=1:100
A(I,1:3)=[1-I*0.01 1-I*0.001 0+I*0.00];
B(I,1:3)=[0-I*0.00 0+I*0.01 0+I*0.00];
C(I,1:3)=[0-I*0.00 0+(11-I)*0.01 0+I*0.00];
end
%A
%B
%C
h=[A;B];
colormap(h);
brighten(.5);
%darken(0.5);
%light('color','w');
%light('color','y');
%
%surf(X,Y,z);hold on;%海平面
%light('color','g');
评论