summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-6-5.mp
blob: bf9ae51e94c49cc0619578109d84afa4f6c66cb7 (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
% --- start of displayed preamble in the book ---
input featpost3Dplus2D
% --- end of displayed preamble in the book ---
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
SphericalDistortion := true;
Spread := 50;
f := 0.4*(1.5,0.5,1);
numeric gridstep, sidenumber, i, coord;
color pa, pb, pc, pd;
gridstep = 0.1;
sidenumber = 5;
coord = 0.5*sidenumber*gridstep;
for i=0 upto sidenumber:
  pa := (-coord,-coord+i*gridstep,0);
  pb := (coord,-coord+i*gridstep,0);
  pc := (-coord+i*gridstep,-coord,0);
  pd := (-coord+i*gridstep,coord,0);
  draw pathofstraightline( pa, pb );
  draw pathofstraightline( pc, pd );
endfor;
endfig;
end;