surfl

Display 3-D color surface wih lighting

# Calling Sequence

    hdl = surf(X,Y,Z,S)

## Parameter

X

- 1 by m matrix or n by m matrix

Y

- 1 by n matrix or n by m matrix

Z

- n by m matrix

S

- 3 elements vector

hdl

- Handle of the created Fac3d entity

## Description

surfl(x,y,Z,S) plots the surface with default color data computed as the reflectance with respect of a light source whose direction is given by parameter S. The default direction of the light source is [1 1 1].

## Example

    [u,v]=meshgrid(linspace(0,2*%pi,50),linspace(0,%pi,25));
    x=sin(v).*cos(u);
    y=sin(v).*sin(u);
    z=cos(v);
    surfl(x,y,z,[1 1 -1]);
    hold on
    surfl(x+1,y,z,[1 1 -1]);
    surfl(x+.5,y,z+1,[1 1 -1]);
    hold off
    axis equal
    shading interp
    colormap gray

## Screenshot

## See Also

- plot
- plot3
- surf
- trisurfl
- colormap
- shading
- caxis

## Authors

- Stéphane Mottelet