% --- start of displayed preamble in the book ---
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
def f(expr a)=sind(a) enddef;
numeric u; u=5mm;
path p;
numeric n; n=16;
p=(0,f(0))
for i:=1 upto n:
.. ((i/n)*10u,3u*f(i*(360/n)))
endfor;
draw p;
endfig;
end;