Does anyone know how to combine/merge two surfaces to be used with the function surfl?
I am trying to study mutual shadings using the function surfl. If I plot only one surface, it is quite easy. For instance, by using the following code it is possible to study/identify the mutual shadings created by the light on the function ripples [1]:
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
s = [-45 30];
k = [.65 .4 .3 10];
sl = surfl(X,Y,Z,s,k);
Nevertheless, I still did not figure out how to do it when there are two surfaces. For instance, in the following code I have two surfaces but surfl works only on one surface, the upper one (I have omitted s and k, in the first surfl(X,Y,Z) to see if by specifying those only one time was ok). It looks that the parameters s and k are only related to a single surface. Is there a way to set the ligth that works for both surfaces? Thanks in advance for any suggestion.
s = [0 15];
k = [1 .3 .3 0];
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = zeros(size(X));
surfl(X,Y,Z)
hold on
[X,Y] = meshgrid(1:0.5:10,1:20);
Z(:,:)=1;
surfl(X,Y,Z,s,k)
References