%% Compare Lighting Algorithms
% Create a sphere. There is no light by default, which is the same as having a light and setting the algorithm to none.

sphere
axis equal

%
% Call the lightangle function to create a light at an azimuth angle of -45 degrees and an elevation angle of 30 degrees. When you create the light, the default lighting algorithm is flat.

lightangle(gca,-45,30)

%
% Change the lighting algorithm to gouraud.

lighting gouraud

% Copyright 2019 The MathWorks, Inc.