Page 185 - Basics of MATLAB and Beyond
P. 185
cols = [1 1 1
1 1 0
0 1 0];
for i = 1:length(x)
light(’pos’,[x(i),y(i),z(i)],...
’color’,cols(i,:))
end
pltlight
This is the flat lighting method. Other ways of rendering light are
lighting gouraud
lighting phong
The default is lighting flat.
Continuing the last example, we illustrate some different material
properties:
material metal
material shiny
c 2000 by CRC Press LLC

