summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-4-6.mp
blob: dda27950af39b8127f1ac85f86e333768b3c5a04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% --- start of displayed preamble in the book ---

% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
numeric r,pr,x,rmin,rmax,ur,ux;
rmin=1.9;
rmax=3;
ur=5cm;
ux=6cm;
r:=rmin;
pr:=(rmax-rmin)/250;
for i=1 upto 250:
  x:=.3;
  for j=1 upto 50:
    x:=(1+r)*x-r*x*x;
  endfor;
  for j=1 upto 50:
    x:=(1+r)*x-r*x*x;
    draw (r,x) xscaled ur yscaled ux;
  endfor;
  r:=r+pr;
endfor;


endfig;
end;