% Make some cubes   
cube2 =[
26928     259       0;
24485     259       0;
24485     259       8;
26928     259       8;
24485      17       8;
26928      17       8;
26928      17       0;
24485      17       0];
cube3 =[
26928     501       0;
24485     501       0;
24485     501       7;
26928     501       7;
24485     259       7;
26928     259       7;
26928     259       0;
24485     259       0];
cube4 =[
30781     -16       0;
28359     -16       0;
28359     -16       7;
30781     -16       7;
28359    -500       7;
30781    -500       7;
30781    -500       0;
28359    -500       0];

% Define the faces
face = [1 2 3 4;
4 3 5 6;
6 7 8 5;
1 2 8 7;
6 7 1 4;
2 3 5 8];
alpha=.2;

clf       
% Plot the cubes    
patch('FaceAlpha',alpha,'Faces',face,'Vertices',cube2,'FaceColor',[0 0 1]);
patch('FaceAlpha',alpha,'Faces',face,'Vertices',cube3,'FaceColor',[0 0 1]);
patch('FaceAlpha',alpha,'Faces',face,'Vertices',cube4,'FaceColor',[0 0 1]);
view(-25,60)
'Here are the cubes'
pause(5)
'Now rotate so that the two ones together obscure the one in the back'
view(-108,20)
'Note how the two are not transparent'
pause(5)
'Now rotate to look from the back'
view(40,48)
'Note the proper transparency'    
    