h = surfl(x,y,Z,s)
h = surfl(...)
surflproduces a shaded surface plot based on a combination of diffuse, specular and ambient lighting models. View the surfaces with a grayscale or similar colormap (such as
pink) and with interpolated shading.
surfl(x,y,Z,s) are used the same way as
surf(...), but accept an optional trailing argument
s, if specified, is a three-element vector
s = [Sx Sy Sz] that specifies the direction of the light source.
s can also be specified in spherical coordinates,
s = [azimuth,elevation].
h = surfl(...) returns a handle to a surface object.
The default value for
s is 45° counterclockwise from the current view direction.
s points from the object to the light source.
peaksfunction, with a light source, is
[x,y] = meshgrid(-3:1/8:3);
z = peaks(x,y);
axis([-3 3 -3 3 -8 8])
(c) Copyright 1994 by The MathWorks, Inc.