| 1 |
% triangulartrimesh.mp |
| 2 |
% L. Nobre G. |
| 3 |
% IYP (2005) |
| 4 |
|
| 5 |
input featpost3Dplus2D; |
| 6 |
|
| 7 |
def zsurface( expr xc, yc ) = |
| 8 |
cosd(xc*57)*cosd(yc*57)+4*mexp(-(xc**2+yc**2)*6.4) |
| 9 |
enddef; |
| 10 |
|
| 11 |
f := 16*(4,1,1); |
| 12 |
Spread := 35; |
| 13 |
LightSource := 10*(4,-3,4); |
| 14 |
defaultfont := "cmvtt10"; |
| 15 |
beginfig(1); |
| 16 |
numeric np, ssize, lx, ly, topl, ystep, i, zl; |
| 17 |
string L[]; |
| 18 |
L0 = "P"; |
| 19 |
L1 = "H"; |
| 20 |
L2 = "Y"; |
| 21 |
L3 = "S"; |
| 22 |
L4 = "I"; |
| 23 |
L5 = "C"; |
| 24 |
L6 = "S"; |
| 25 |
np = 72; |
| 26 |
ssize = 15; |
| 27 |
ly = -0.5*ssize; |
| 28 |
lx = -sqrt(3)*ssize/6; |
| 29 |
ystep = ssize/7; |
| 30 |
topl = 2*zsurface( 0, 0 ); |
| 31 |
for i=0 upto 6: |
| 32 |
zl := zsurface(lx,i*ystep+ly); |
| 33 |
labelinspace(false,(lx,i*ystep+ly,zl),green*ystep,blue*(topl-zl),L[i]); |
| 34 |
endfor; |
| 35 |
hexagonaltrimesh( false,np,ssize,zsurface); |
| 36 |
label.ulft("matagalatlante.org",lrcorner currentpicture); |
| 37 |
endfig; |
| 38 |
|
| 39 |
end; |