% --- start of displayed preamble in the book --- def r(expr theta)= (theta/10) enddef; vardef polcurve(text f)(expr c,a,b,n)= save delta,_r,_a; delta=(b-a)/n; draw (c+f(a)*dir(a)) for i:=0 upto n-1: hide( _a:=a+i*delta; _r:=f(_a);) ..(c+f(_a+delta)*dir(_a+delta)) endfor; enddef; % --- end of displayed preamble in the book --- defaultfont:="ptmr8r"; warningcheck:=0; beginfig(1) polcurve(r)(origin,0,1150,1000); endfig; end;