% --- start of displayed preamble in the book ---
input featpost3Dplus2D
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
Spread := 30;
f := 5.4*(1.5,0.5,1);
numeric gridstep, sidenumber,
       i, j, coord, aa, ab, ac;
color pa;
gridstep = 0.7;
sidenumber = 4;
coord = 0.5*sidenumber*gridstep;
for i=0 upto sidenumber:
 for j=0 upto sidenumber:
   pa := (-coord+j*gridstep,-coord+i*gridstep,0);
   aa := uniformdeviate(360);
   ab := uniformdeviate(180);
   ac := uniformdeviate(90);
   kindofcube(false, false,
              pa, aa, ab, ac, 0.4, 0.4, 0.9 );
 endfor;
endfor;
endfig;
end;