summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-2-16.mp
blob: dd39d3380b97e31e8177a93539deb1e44bec010d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
% --- 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;