%Section 8.3.3.4
%Figure 8.31
n = 20;
t = (0:n)'*2*pi/n;
x = [cos(0:.1:(2*pi)) ones(1,10) -1 -2 -3]+3;
y = [fliplr(1:(length(x)-3)) 1 1 1 ];
t = (0:20)'*2*pi/20;
xx = cos(t)*x;
yy = sin(t)*x;
zz = ones(n+1,1)*y;
[nx,ny,nz] = surfnorm(xx,yy,zz);
reflectance = specular(nx,ny,nz,[-80.5 30],...
[-70 -30],5) + diffuse(nx,ny,nz,[230 40]);
figure('colormap',hot);
surface_handle = surf(xx,yy,zz,reflectance);
shading interp
axis('off');

