| 1 |
% mce-lng.mp |
| 2 |
% L. Nobre G. |
| 3 |
% 2009 |
| 4 |
|
| 5 |
prologues := 1; |
| 6 |
|
| 7 |
beginfig(1); |
| 8 |
numeric u, anga, angb, posa, posb, thic, marg, angm, stwo, rest; |
| 9 |
numeric plac, n; |
| 10 |
path pta, ptb, ptc, ptd, pte, ptf, ptfa, ptfb, pa, pb; |
| 11 |
picture trib, half, unib; |
| 12 |
transform ta, tb; |
| 13 |
u = 10cm; |
| 14 |
anga = 120; |
| 15 |
angb = 135; |
| 16 |
posa = 0.8; |
| 17 |
posb = 0.23; |
| 18 |
thic = 0.15; |
| 19 |
marg = 0.07; |
| 20 |
angm = 10; |
| 21 |
plac = 0.5; |
| 22 |
stwo = u*sqrt(2); |
| 23 |
rest = u/sqrt(2); |
| 24 |
z1 = u*(0,posa+marg); |
| 25 |
z2 = u*(0,posa); |
| 26 |
z3 = u*(0,posa-thic); |
| 27 |
z4 = u*(0,posa-thic-marg); |
| 28 |
z6 = u*(0,-posb+0.5*thic); |
| 29 |
z7 = u*(0,-posb-0.5*thic); |
| 30 |
z8 = (posb-0.5*thic)[(0,u),(u,0)]; |
| 31 |
z9 = (posb+0.5*thic)[(0,u),(u,0)]; |
| 32 |
z12 = posb[(0,u),(u,0)]; |
| 33 |
z11 = z12+rest*(marg,marg); |
| 34 |
z13 = z12-rest*(thic,thic); |
| 35 |
z14 = z12-rest*(marg+thic,marg+thic); |
| 36 |
z22 = posa[(0,-u),(u,0)]; |
| 37 |
z21 = z22+rest*(marg,-marg); |
| 38 |
z23 = z22-rest*(thic,-thic); |
| 39 |
z24 = z22-rest*(marg+thic,-marg-thic); |
| 40 |
z33 = (plac*x43,y43); |
| 41 |
z34 = (plac*x43+stwo*marg,y43); |
| 42 |
z32 = (plac*x43-stwo*thic,y43); |
| 43 |
z31 = (plac*x43-stwo*(thic+marg),y43); |
| 44 |
z43 = (posa-thic)[(0,-u),(u,0)]; |
| 45 |
pta = z6{dir(angb+0.5*angm-90)}..{dir(angb+0.5*angm-45)}z8; |
| 46 |
ptb = z7{dir(angb-0.5*angm-90)}..{dir(angb-0.5*angm-45)}z9; |
| 47 |
ptc = z4{dir(anga-angm-90)}..{dir(-45)}z14..{dir(-135)}z24..z34; |
| 48 |
ptd = z3{dir(anga-angm-90)}..{dir(-45)}z13..{dir(-135)}z23..{up}z33 |
| 49 |
..{dir(anga-angm-135)}z43; |
| 50 |
pte = z2{dir(anga-90)}..{dir(-45)}z12..{dir(-135)}z22..{up}z32 |
| 51 |
..{dir(anga-135)}z22; |
| 52 |
ptf = z1{dir(anga-90)}..{dir(-45)}z11..{dir(-135)}z21..{up}z31; |
| 53 |
ta = identity scaled (1/sqrt(2)) shifted (0,rest) rotated 45; |
| 54 |
tb = identity scaled (1/sqrt(2)) shifted (0,-rest) rotated -45; |
| 55 |
ptfa = ptf transformed ta; |
| 56 |
ptfb = ptf transformed tb; |
| 57 |
pa = buildcycle( pte, ptc, reverse ptd, reverse ptfa ); |
| 58 |
% draw pta; |
| 59 |
% draw ptb; |
| 60 |
% draw ptc; |
| 61 |
% draw ptd; |
| 62 |
% draw pte; |
| 63 |
% draw ptf; |
| 64 |
% draw ptfb; |
| 65 |
pb = buildcycle( pta, ptc, reverse ptb, reverse ptfb ); |
| 66 |
fill pa; |
| 67 |
fill pb; |
| 68 |
% draw (0,-u)--(u,0)--(0,u)--cycle; |
| 69 |
trib = currentpicture; |
| 70 |
currentpicture := nullpicture; |
| 71 |
drawoptions( shifted (u,0) ); |
| 72 |
draw trib; |
| 73 |
draw trib transformed ta; |
| 74 |
draw trib transformed tb; |
| 75 |
drawoptions(); |
| 76 |
draw trib scaled 0.5 shifted (0.5u,0) rotated 90; |
| 77 |
draw trib scaled 0.5 shifted (0.5u,0) rotated (-90); |
| 78 |
half = currentpicture; |
| 79 |
draw half rotated 180; |
| 80 |
unib := currentpicture; |
| 81 |
draw currentpicture scaled 0.5; |
| 82 |
draw unib scaled 0.25; |
| 83 |
% draw currentpicture scaled 0.25; |
| 84 |
% draw unib scaled 0.0625 withcolor blue; |
| 85 |
% dotlabels.urt( 1,2,3,4,6,7,8,9,11,12,13,14,21,22,23,24,31,32,33,34,43); |
| 86 |
% dotlabels.urt(31,32,33,34,43); |
| 87 |
endfig; |
| 88 |
|
| 89 |
end. |