home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / tex / mutex.arc / MF.ARC / NOTEN16.MF < prev    next >
Text File  |  1990-03-06  |  10KB  |  293 lines

  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %                                                             %
  3. %       NOTENKOEPFE UND FAEHNCHEN                             %
  4. %                                                             %
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %
  7. %
  8. %
  9. %
  10. %%%%%%%%%%%%%%%
  11. %%notenkoepfe %
  12. %%%%%%%%%%%%%%%
  13. %
  14. %
  15. %
  16. %
  17. def drawnoteb(expr noteheadwidth, theta_a, theta_b, theta_c,
  18. width_a, width_b)  =
  19.                                             %         .l
  20.             penpos1(width_a, theta_a);      %         .2
  21.                                             %         .r
  22.             penpos3(width_a, 180+theta_a);  %.l.1.r            .r.3.l
  23.                                             %         .r
  24.             penpos2(width_b, 180+theta_b);  %         .4
  25.                                             %         .l
  26.             penpos4(width_b,   theta_b);    %
  27.             y1 = y3 = 0;
  28.             x2 = x4 = 1/2noteheadwidth;
  29.             x1l= 0; x3l = w; y2l = h; y4l = -h;
  30.             penstroke (z1e{up}..z2e{right}..z3e{down}..z4e{left}..cycle)
  31.             rotatedaround((origin +1/2w*right),theta_c);
  32.             enddef;
  33. %
  34. %
  35. %%%%%%%%%%%%%%%
  36. %%    flags   %
  37. %%%%%%%%%%%%%%%
  38. %
  39. %
  40. %
  41. pickup pencircle scaled (0.1pt);
  42. def penstrike text t =
  43.  forsuffixes e = l,r: path_.e:=t; endfor
  44.  if cycle path_.l: cyclestroke_
  45.  else: filldraw path_.l -- reverse path_.r -- cycle fi enddef;
  46. def flagshape (suffix i) (expr width, height, thicka, thin, shift) =
  47.            pair intersectionp;                             %
  48.            thick := 1/3 height;
  49.            sh[-3] = origin;
  50.            sh[i] = shift;                                  %  .1
  51.            penpos[i](thick,90);                            %
  52.            penpos[i+1](  3thin ,90);                       %       .2
  53.            penpos[i+2](thin,0);                            %
  54.            penpos[i+3](thin,0);                            %           .3
  55.            x[i] =  -1/16mm;                                %
  56.            y[i]r =  height;                                %        .4
  57.            x[i+1] = 3/8width;                              %
  58.            y[i+1] = height - thick;                        %
  59.            y[i+3] = 0;
  60.            x[i+2]r  = x[i+3]+2s= width;
  61.            y[i+2]r = height - 2thick;
  62.            if i>1: intersectionp  = z[i-2];
  63.            else   : intersectionp = z[i+3];
  64.            fi;
  65.            penstrike (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  66.            ..z[i+1]e{z[i+1]e-z[i]e}
  67.            ..z[i+2]e{down}..intersectionp shifted (sh[i-4]-sh[i]))
  68.            shifted sh[i];
  69.            for n=0 upto 3:
  70.            k:=i+n;
  71.            penlabels(k);endfor;
  72.            enddef;
  73.  
  74. %def flagshaper (suffix i) (expr width, height, thicka, thin, shift) =
  75. %           pair intersectionp;                             %
  76. %           thick := 1/3 height;
  77. %           sh[-3] := origin+shift;
  78. %           sh[i] = shift;                                  %  .1
  79. %           penpos[i](thick,90);                            %
  80. %           penpos[i+1](  3thin ,90);                       %       .2
  81. %           penpos[i+2](thin,0);                            %
  82. %           penpos[i+3](thin,0);                            %           .3
  83. %           x[i] =  0;                                      %
  84. %           y[i]r =  height;                                %        .4
  85. %           x[i+1] = 3/8width;                              %
  86. %           y[i+1] = height - thick;                        %
  87. %           y[i+3] = 0;
  88. %           x[i+2]r  = x[i+3]+2s= width;
  89. %           y[i+2]r = height - 2thick;
  90. %           if i>1: intersectionp  = z[i-2];
  91. %           else   : intersectionp = z[i+3];
  92. %           fi;
  93. %           penstroke (counterclockwise
  94. %           (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  95. %           ..z[i+1]e{z[i+1]e-z[i]e}
  96. %           ..z[i+2]e{down}..intersectionp shifted (-sh[i-4]+sh[i]))
  97. %           reflectedabout (z1r scaled 0.5,
  98. %             z1r scaled 0.5+right) )
  99. %           shifted sh[i];
  100. %           for n=0 upto 3:
  101. %           k:=i+n;
  102. %           penlabels(k);endfor;
  103. %           enddef;
  104.  
  105. def flagshaper (suffix i) (expr width, height, thicka, thin, shift) =
  106.            pair intersectionp;                             %
  107.            thick := 1/3 height;
  108.            sh[-3] := origin+shift;
  109.            sh[i] = shift;                                  %  .1
  110.            penpos[i](thick,90);                            %
  111.            penpos[i+1](  3thin ,90);                       %       .2
  112.            penpos[i+2](thin,0);                            %
  113.            penpos[i+3](thin,0);                            %           .3
  114.            x[i] =  0;                                      %
  115.            y[i]r =  height;                                %        .4
  116.            x[i+1] = 3/8width;                              %
  117.            y[i+1] = height - thick;                        %
  118.            y[i+3] = 0;
  119.            x[i+2]r  = x[i+3]+2s= width;
  120.            y[i+2]r = height - 2thick;
  121.            if i>1: intersectionp  = z[i-2];
  122.            else   : intersectionp = z[i+3];
  123.            fi;
  124.            penstrike (counterclockwise
  125.            (z[i]e{dir(angle(z[i+1]e-z[i]e)-15)}
  126.            ..z[i+1]e{z[i+1]e-z[i]e}
  127.            ..z[i+2]e{down}..intersectionp shifted (-sh[i-4]+sh[i]))
  128.            reflectedabout (z1r scaled 0.5,
  129.              z1r scaled 0.5+right) )
  130.            shifted sh[i];
  131.            enddef;
  132.  
  133.  
  134. %%%%%%%%%%%%%%%
  135. %% volle Note %
  136. %%%%%%%%%%%%%%%
  137.  
  138. beginchar(33, nhw#, .5nhh#, .5nhh#);
  139.           w:=w+2thinwidth;
  140.           drawnoteb(w, 0, 90, 20, w/2, nhh/2);
  141. endchar;
  142.  
  143. %%%%%%%%%%%%%%%
  144. %% halbe Note %
  145. %%%%%%%%%%%%%%%
  146.  
  147. beginchar(34, nhw#, .5nhh#, .5nhh#);
  148.           w:=w+2thinwidth;
  149.           drawnoteb(w, 0, 90, 20, thinwidth, nhh/4);
  150. endchar;
  151.  
  152. %%%%%%%%%%%%%%%
  153. %% ganze Note %
  154. %%%%%%%%%%%%%%%
  155.  
  156. beginchar (35,1.5nhh#, .5nhh#, .5nhh#);
  157.           drawnoteb(w, 0, 85, 0, nhh/3, thinwidth);
  158. endchar;
  159.  
  160. %%%%%%%%%%%%%%%%%%%%%%%
  161. %% "8flag nach unten" %
  162. %%%%%%%%%%%%%%%%%%%%%%%
  163.  
  164. beginchar(40, 0, 3nhh#, 0);
  165.           clear;
  166.           w:=nhw;
  167.           flagshape (1,w, h, nhh,  5thinwidth, origin);
  168.           w:=0;
  169. endchar;
  170.  
  171. %%%%%%%%%%%%%%%%%%%%%%%%
  172. %% "16flag nach unten" %
  173. %%%%%%%%%%%%%%%%%%%%%%%%
  174.  
  175. beginchar(41, 0, 3.25nhh#, 0);
  176.           clear;
  177.           w:=nhw;
  178.           flagshape (1, w, 2.5nhh, 2/3nhh, 5thinwidth, origin);
  179.           flagshape (5,.95 w, 2.25 nhh, 2/3nhh, 5thinwidth, (0,nhh));
  180.           w:=0;
  181. endchar;
  182.  
  183. %%%%%%%%%%%%%%%%%%%%%%%%
  184. %% "32flag nach unten" %
  185. %%%%%%%%%%%%%%%%%%%%%%%%
  186.  
  187. beginchar(42, 0, 3.75  nhh#, 0);
  188.           clear;
  189.           w:=nhw;
  190.           flagshape (1, w, 2.5nhh, 2/3nhh, 5thinwidth, origin);
  191.           flagshape (5, .95w, 2.25 nhh, 2/3nhh, 5thinwidth, (0,nhh));
  192.           flagshape (9, .9w, 2   nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  193.           w:=0;
  194. endchar;
  195.  
  196. %%%%%%%%%%%%%%%%%%%%%%%%
  197. %% "64flag nach unten" %
  198. %%%%%%%%%%%%%%%%%%%%%%%%
  199.  
  200. beginchar(43, 0, 4.25nhh#, 0);
  201.           clear;
  202.           w:=nhw;
  203.           flagshape (1, w, 2.5nhh, 2/3nhh, 5thinwidth, origin);
  204.           flagshape (5,.95 w, 2.25 nhh, 2/3nhh, 5thinwidth, (0,nhh));
  205.           flagshape (9,.9w, 2  nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  206.           flagshape(13,0.85w, 2nhh, 2/3nhh, 5thinwidth, (0,2.25nhh));
  207.           w:=0;
  208. endchar;
  209.  
  210. %%%%%%%%%%%%%%%%%%%%%%%%%
  211. %% "128flag nach unten" %
  212. %%%%%%%%%%%%%%%%%%%%%%%%%
  213.  
  214. beginchar(44, 0,   4.5nhh#, 0);
  215.           clear;
  216.           w:=nhw;
  217.           flagshape (1, w, 2.5nhh, 2/3nhh, 5thinwidth, origin);
  218.           flagshape (5, w, 2.25nhh, 2/3nhh, 5thinwidth, (0,nhh));
  219.           flagshape (9, w, 2 nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  220.           flagshape(13,0.9 w, 2nhh, 2/3nhh, 5thinwidth, (0,2.25nhh));
  221.           flagshape(17,0.9 w, 1.5nhh, 1/3nhh, 5thinwidth, (0,3nhh));
  222.           w:=0;
  223. endchar;
  224.  
  225. %%%%%%%%%%%%%%%%%%%%%%
  226. %% "8flag nach oben" %
  227. %%%%%%%%%%%%%%%%%%%%%%
  228.  
  229. beginchar(45, 0, 3nhh#, 0);
  230.          clear;
  231.          w:=nhw;
  232.          flagshaper(1,w, h, nhh, 5thinwidth, origin);
  233.          penlabels(1,2,3,4);
  234.          w:=0;
  235. endchar;
  236.  
  237. %%%%%%%%%%%%%%%%%%%%%%%
  238. %% "16flag nach oben" %
  239. %%%%%%%%%%%%%%%%%%%%%%%
  240.  
  241. beginchar(46, 0, 3.25nhh#, 0);
  242.           clear;
  243.          w:=nhw;
  244.           flagshaper(1, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,0.75nhh));
  245.           flagshaper(5, w, 2.25 nhh, 2/3nhh, 5thinwidth,(0,-0.25nhh));
  246.          penlabels(1,2,3,4,5,6,7,8);
  247.           w:=0;
  248. endchar;
  249.  
  250. %%%%%%%%%%%%%%%%%%%%%%%
  251. %% "32flag nach oben" %
  252. %%%%%%%%%%%%%%%%%%%%%%%
  253.  
  254. beginchar(47, 0, 3.75  nhh#, 0);
  255.           clear;
  256.          w:=nhw;
  257.           flagshaper(1, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,1.5nhh));
  258.           flagshaper(5, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,0.75nhh));
  259.           flagshaper(9, .95w, 2.25 nhh, 2/3nhh, 5thinwidth, origin);
  260.          penlabels(1,2,3,4,5,6,7,8,9,10,11,12);
  261.           w := 0;
  262. endchar;
  263.  
  264. %%%%%%%%%%%%%%%%%%%%%%%
  265. %% "64flag nach oben" %
  266. %%%%%%%%%%%%%%%%%%%%%%%
  267.  
  268. beginchar(48, 0, 4.25nhh#, 0);
  269.           clear;
  270.          w:=nhw;
  271.           flagshaper(1, w, 2.5nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  272.           flagshaper(5, w, 2.25 nhh, 2/3nhh, 5thinwidth, (0,1nhh));
  273.           flagshaper(9,w, 2  nhh, 2/3nhh, 5thinwidth, (0,0.34nhh));
  274.           flagshaper(13,0.9w, 2nhh, 2/3nhh, 5thinwidth, (0,-0.32nhh));
  275.          penlabels(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16);
  276.           w := 0;
  277. endchar;
  278.  
  279. %%%%%%%%%%%%%%%%%%%%%%%%
  280. %% "128flag nach oben" %
  281. %%%%%%%%%%%%%%%%%%%%%%%%
  282.  
  283. beginchar(49, 0,   4.5nhh#, 0);
  284.           clear;
  285.          w:=nhw;
  286.           flagshaper (1, w, 2.25nhh, 2/3nhh, 5thinwidth, (0,2.5nhh));
  287.           flagshaper (5, w, 2.25nhh, 2/3nhh, 5thinwidth, (0,1.75nhh));
  288.           flagshaper (9, w, 2 nhh, 2/3nhh, 5thinwidth, (0,1nhh));
  289.           flagshaper(13,0.9 w, 2nhh, 2/3nhh, 5thinwidth, (0,0.5nhh));
  290.           flagshaper(17,0.9 w, 2nhh, 1/3nhh, 5thinwidth, (0,0nhh));
  291.           w := 0;
  292. endchar;
  293.