summaryrefslogtreecommitdiff
path: root/info/examples/lgc2/4-6-2.mp
blob: 495296b7fea4fafd5a9a3f4ac364e62f8335fea7 (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
% --- start of displayed preamble in the book ---
input featpost3Dplus2D
% --- end of displayed preamble in the book ---
% graphic converted to gray in book using 'color2gray'
defaultfont:="ptmr8r";
warningcheck:=0;
beginfig(1)
def zsurface( expr xc, yc ) =
        cosd(xc*57)*cosd(yc*57)
        +4*mexp(-(xc**2+yc**2)*6.4)
enddef;

f := 7*(4,1,5);
Spread := 35;
LightSource := 10*(4,-3,4);
SubColor := 0.4background;

numeric np, ssize;
path chair;
np = 20;
ssize = 5;

hexagonaltrimesh( true,np,ssize,zsurface);
endfig;
end;